Commit 2442b531 authored by Adam Barth's avatar Adam Barth

Add a basic popup menu widget

Currently this widget is demoed in widgets-fn, but I'll move it into stocks-fn
soon.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1017873002
parent 697c7357
......@@ -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),
]
)
]
);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment