OLD | NEW |
| (Empty) |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 import 'package:sky/framework/fn.dart'; | |
6 import 'package:sky/framework/components/button.dart'; | |
7 import 'package:sky/framework/components/input.dart'; | |
8 import 'package:sky/framework/components/popup_menu.dart'; | |
9 | |
10 class WidgetsApp extends App { | |
11 static final Style _menuStyle = new Style(''' | |
12 position: absolute; | |
13 top: 200px; | |
14 left: 200px;'''); | |
15 | |
16 PopupMenuController controller; | |
17 | |
18 UINode build() { | |
19 return new Container( | |
20 children: [ | |
21 new Button(key: 'Go', content: new Text('Go'), level: 1), | |
22 new Button(key: 'Back', content: new Text('Back'), level: 3), | |
23 new Input() | |
24 | |
25 // PopupMenu requires a PopupMenuController and should be wired up | |
26 // to a button to create the controller only when the menu is open, etc. | |
27 // new Container( | |
28 // style: _menuStyle, | |
29 // children: [ | |
30 // new PopupMenu( | |
31 // controller: controller, | |
32 // items: [ | |
33 // [new Text('People & options')], | |
34 // [new Text('New group conversation')], | |
35 // [new Text('Turn history off')], | |
36 // [new Text('Archive')], | |
37 // [new Text('Delete')], | |
38 // [new Text('Un-merge SMS')], | |
39 // [new Text('Help & feeback')], | |
40 // ], | |
41 // level: 4), | |
42 // ] | |
43 // ) | |
44 // ] | |
45 ); | |
46 } | |
47 } | |
OLD | NEW |