Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: sky/framework/components/menu_item.dart

Issue 1137373004: [Effen] Make the stock app use the radio button widget so that it's being tested. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/stocks/lib/stock_app.dart ('k') | sky/framework/fn.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/components/menu_item.dart
diff --git a/sky/framework/components/menu_item.dart b/sky/framework/components/menu_item.dart
index 9f6ee033d054a1a98b4b2e376ad36a62651278fc..8d7cda7c7f9bb22632342088e2a6cc301f1e7f3a 100644
--- a/sky/framework/components/menu_item.dart
+++ b/sky/framework/components/menu_item.dart
@@ -3,6 +3,7 @@
// found in the LICENSE file.
import '../fn.dart';
+import '../layout.dart';
import 'button_base.dart';
import 'icon.dart';
import 'ink_well.dart';
@@ -32,27 +33,32 @@ class MenuItem extends ButtonBase {
List<UINode> children;
String icon;
+ GestureEventListener onGestureTap;
- MenuItem({ Object key, this.icon, this.children }) : super(key: key);
+ MenuItem({ Object key, this.icon, this.children, this.onGestureTap }) : super(key: key);
UINode buildContent() {
- return new StyleNode(
- new InkWell(
- children: [
- new StyleNode(
- new Icon(
- size: 24,
- type: "${icon}_grey600"
+ return new EventListenerNode(
+ new StyleNode(
+ new InkWell(
+ children: [
+ new StyleNode(
+ new Icon(
+ size: 24,
+ type: "${icon}_grey600"
+ ),
+ _iconStyle
),
- _iconStyle
- ),
- new Container(
- style: _labelStyle,
- children: children
- )
- ]
+ new FlexContainer(
+ direction: FlexDirection.Row,
+ style: _labelStyle,
+ children: children
+ )
+ ]
+ ),
+ highlight ? _highlightStyle : _style
),
- highlight ? _highlightStyle : _style
+ onGestureTap: onGestureTap
);
}
}
« no previous file with comments | « sky/examples/stocks/lib/stock_app.dart ('k') | sky/framework/fn.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698