| // Copyright 2015 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| import 'package:sky/framework/fn.dart'; |
| import 'package:sky/framework/layout.dart'; |
| import 'package:sky/framework/components/popup_menu.dart'; |
| import 'package:sky/framework/components/checkbox.dart'; |
| import 'package:sky/framework/theme/view_configuration.dart'; |
| class StockMenu extends Component { |
| static final Style _style = new Style(''' |
| top: ${8 + kStatusBarHeight}px;'''); |
| PopupMenuController controller; |
| StockMenu({Object key, this.controller, this.autorefresh: false, this.onAutorefreshChanged}) : super(key: key); |
| final ValueChanged onAutorefreshChanged; |
| static FlexBoxParentData _flex1 = new FlexBoxParentData()..flex = 1; |
| var checkbox = new Checkbox( |
| checked: this.autorefresh, |
| onChanged: this.onAutorefreshChanged |
| [new Text('Remove stock')], |
| [new ParentDataNode(new Text('Autorefresh'), _flex1), checkbox], |