| 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 '../../framework/fn.dart'; | 5 import '../../framework/fn.dart'; |
| 6 import '../../framework/components/button.dart'; | 6 import '../../framework/components/button.dart'; |
| 7 import '../../framework/components/popup_menu.dart'; | 7 import '../../framework/components/popup_menu.dart'; |
| 8 import '../../framework/components/popup_menu_item.dart'; | |
| 9 | 8 |
| 10 class WidgetsApp extends App { | 9 class WidgetsApp extends App { |
| 11 static final Style _menuStyle = new Style(''' | 10 static final Style _menuStyle = new Style(''' |
| 12 position: absolute; | 11 position: absolute; |
| 13 top: 200px; | 12 top: 200px; |
| 14 left: 200px;'''); | 13 left: 200px;'''); |
| 15 | 14 |
| 16 Node build() { | 15 Node build() { |
| 17 return new Container( | 16 return new Container( |
| 18 children: [ | 17 children: [ |
| 19 new Button(key: 'Go', content: new Text('Go'), level: 1), | 18 new Button(key: 'Go', content: new Text('Go'), level: 1), |
| 20 new Button(key: 'Back', content: new Text('Back'), level: 3), | 19 new Button(key: 'Back', content: new Text('Back'), level: 3), |
| 21 new Container( | 20 new Container( |
| 22 style: _menuStyle, | 21 style: _menuStyle, |
| 23 children: [ | 22 children: [ |
| 24 new PopupMenu( | 23 new PopupMenu( |
| 25 children: [ | 24 items: [ |
| 26 new PopupMenuItem(key: '1', children: [new Text('People & opti
ons')]), | 25 [new Text('People & options')], |
| 27 new PopupMenuItem(key: '2', children: [new Text('New group con
versation')]), | 26 [new Text('New group conversation')], |
| 28 new PopupMenuItem(key: '3', children: [new Text('Turn history
off')]), | 27 [new Text('Turn history off')], |
| 29 new PopupMenuItem(key: '4', children: [new Text('Archive')]), | 28 [new Text('Archive')], |
| 30 new PopupMenuItem(key: '5', children: [new Text('Delete')]), | 29 [new Text('Delete')], |
| 31 new PopupMenuItem(key: '6', children: [new Text('Un-merge SMS'
)]), | 30 [new Text('Un-merge SMS')], |
| 32 new PopupMenuItem(key: '7', children: [new Text('Help & feebac
k')]), | 31 [new Text('Help & feeback')], |
| 33 ], | 32 ], |
| 34 level: 4), | 33 level: 4), |
| 35 ] | 34 ] |
| 36 ) | 35 ) |
| 37 ] | 36 ] |
| 38 ); | 37 ); |
| 39 } | 38 } |
| 40 } | 39 } |
| OLD | NEW |