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

Side by Side Diff: sky/examples/stocks2/lib/stock_menu.dart

Issue 1174023003: Remove one more use of mirrors: Components now have to explicitly sync their fields. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 | « sky/examples/stocks2/lib/stock_list.dart ('k') | sky/examples/stocks2/lib/stock_row.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 'package:sky/framework/fn2.dart'; 5 import 'package:sky/framework/fn2.dart';
6 import 'package:sky/framework/components2/popup_menu.dart'; 6 import 'package:sky/framework/components2/popup_menu.dart';
7 import 'package:sky/framework/components2/checkbox.dart'; 7 import 'package:sky/framework/components2/checkbox.dart';
8 import 'package:sky/framework/theme/view_configuration.dart'; 8 import 'package:sky/framework/theme/view_configuration.dart';
9 9
10 class StockMenu extends Component { 10 class StockMenu extends Component {
11 PopupMenuController controller;
12 11
13 StockMenu({Object key, this.controller, this.autorefresh: false, this.onAutore freshChanged}) : super(key: key); 12 StockMenu({
13 Object key,
14 this.controller,
15 this.autorefresh: false,
16 this.onAutorefreshChanged
17 }) : super(key: key);
14 18
19 final PopupMenuController controller;
15 final bool autorefresh; 20 final bool autorefresh;
16 final ValueChanged onAutorefreshChanged; 21 final ValueChanged onAutorefreshChanged;
17 22
18 UINode build() { 23 UINode build() {
19 var checkbox = new Checkbox( 24 var checkbox = new Checkbox(
20 checked: this.autorefresh, 25 checked: this.autorefresh,
21 onChanged: this.onAutorefreshChanged 26 onChanged: this.onAutorefreshChanged
22 ); 27 );
23 28
24 return new StackPositionedChild( 29 return new StackPositionedChild(
25 new PopupMenu( 30 new PopupMenu(
26 controller: controller, 31 controller: controller,
27 items: [ 32 items: [
28 [new Text('Add stock')], 33 [new Text('Add stock')],
29 [new Text('Remove stock')], 34 [new Text('Remove stock')],
30 // [new FlexExpandingChild(new Text('Autorefresh')), checkbox], 35 // [new FlexExpandingChild(new Text('Autorefresh')), checkbox],
31 ], 36 ],
32 level: 4 37 level: 4
33 ), 38 ),
34 right: 8.0, 39 right: 8.0,
35 top: 8.0 + kStatusBarHeight 40 top: 8.0 + kStatusBarHeight
36 ); 41 );
37 } 42 }
38 } 43 }
OLDNEW
« no previous file with comments | « sky/examples/stocks2/lib/stock_list.dart ('k') | sky/examples/stocks2/lib/stock_row.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698