Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: sky/examples/widgets-fn/widgets_app.dart

Issue 1017873002: Add a basic popup menu widget (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | sky/framework/components/popup_menu.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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';
8 import '../../framework/components/popup_menu_item.dart';
7 9
8 class WidgetsApp extends App { 10 class WidgetsApp extends App {
11 static final Style _menuStyle = new Style('''
12 position: absolute;
13 top: 200px;
14 left: 200px;''');
15
9 Node build() { 16 Node build() {
10 return new Button(content: new Text('Go'), level: 1); 17 return new Container(
18 children: [
19 new Button(key: 'Go', content: new Text('Go'), level: 1),
20 new Button(key: 'Back', content: new Text('Back'), level: 3),
21 new Container(
22 style: _menuStyle,
23 children: [
24 new PopupMenu(
25 children: [
26 new PopupMenuItem(key: '1', children: [new Text('People & opti ons')]),
27 new PopupMenuItem(key: '2', children: [new Text('New group con versation')]),
28 new PopupMenuItem(key: '3', children: [new Text('Turn history off')]),
29 new PopupMenuItem(key: '4', children: [new Text('Archive')]),
30 new PopupMenuItem(key: '5', children: [new Text('Delete')]),
31 new PopupMenuItem(key: '6', children: [new Text('Un-merge SMS' )]),
32 new PopupMenuItem(key: '7', children: [new Text('Help & feebac k')]),
33 ],
34 level: 4),
35 ]
36 )
37 ]
38 );
11 } 39 }
12 } 40 }
OLDNEW
« no previous file with comments | « no previous file | sky/framework/components/popup_menu.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698