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