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
This commit is contained in:
parent
697c735740
commit
2442b5313f
@ -4,9 +4,37 @@
|
|||||||
|
|
||||||
import '../../framework/fn.dart';
|
import '../../framework/fn.dart';
|
||||||
import '../../framework/components/button.dart';
|
import '../../framework/components/button.dart';
|
||||||
|
import '../../framework/components/popup_menu.dart';
|
||||||
|
import '../../framework/components/popup_menu_item.dart';
|
||||||
|
|
||||||
class WidgetsApp extends App {
|
class WidgetsApp extends App {
|
||||||
|
static final Style _menuStyle = new Style('''
|
||||||
|
position: absolute;
|
||||||
|
top: 200px;
|
||||||
|
left: 200px;''');
|
||||||
|
|
||||||
Node build() {
|
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),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user