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

Unified Diff: sky/examples/widgets-fn/widgets_app.dart

Issue 1017873002: Add a basic popup menu widget (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | sky/framework/components/popup_menu.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/widgets-fn/widgets_app.dart
diff --git a/sky/examples/widgets-fn/widgets_app.dart b/sky/examples/widgets-fn/widgets_app.dart
index eaaa0a58eda4db3a94d9578cc66a5759aa98ed93..6a24237033bfb2361fbeb42577d65478a2e39dbb 100644
--- a/sky/examples/widgets-fn/widgets_app.dart
+++ b/sky/examples/widgets-fn/widgets_app.dart
@@ -4,9 +4,37 @@
import '../../framework/fn.dart';
import '../../framework/components/button.dart';
+import '../../framework/components/popup_menu.dart';
+import '../../framework/components/popup_menu_item.dart';
class WidgetsApp extends App {
+ static final Style _menuStyle = new Style('''
+ position: absolute;
+ top: 200px;
+ left: 200px;''');
+
Node build() {
- return new Button(content: new Text('Go'), level: 1);
+ return new Container(
+ children: [
+ new Button(key: 'Go', content: new Text('Go'), level: 1),
+ new Button(key: 'Back', content: new Text('Back'), level: 3),
+ new Container(
+ style: _menuStyle,
+ children: [
+ new PopupMenu(
+ children: [
+ new PopupMenuItem(key: '1', children: [new Text('People & options')]),
+ new PopupMenuItem(key: '2', children: [new Text('New group conversation')]),
+ new PopupMenuItem(key: '3', children: [new Text('Turn history off')]),
+ new PopupMenuItem(key: '4', children: [new Text('Archive')]),
+ new PopupMenuItem(key: '5', children: [new Text('Delete')]),
+ new PopupMenuItem(key: '6', children: [new Text('Un-merge SMS')]),
+ new PopupMenuItem(key: '7', children: [new Text('Help & feeback')]),
+ ],
+ level: 4),
+ ]
+ )
+ ]
+ );
}
}
« no previous file with comments | « no previous file | sky/framework/components/popup_menu.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698