| 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/editing/input.dart'; | 5 import 'package:sky/editing/input.dart'; |
| 6 import 'package:sky/theme/colors.dart' as colors; | |
| 7 import 'package:sky/widgets/basic.dart'; | 6 import 'package:sky/widgets/basic.dart'; |
| 8 import 'package:sky/widgets/drawer.dart'; | 7 import 'package:sky/widgets/drawer.dart'; |
| 9 import 'package:sky/widgets/drawer_header.dart'; | 8 import 'package:sky/widgets/drawer_header.dart'; |
| 10 import 'package:sky/widgets/floating_action_button.dart'; | 9 import 'package:sky/widgets/floating_action_button.dart'; |
| 11 import 'package:sky/widgets/icon.dart'; | 10 import 'package:sky/widgets/icon.dart'; |
| 12 import 'package:sky/widgets/icon_button.dart'; | 11 import 'package:sky/widgets/icon_button.dart'; |
| 13 import 'package:sky/widgets/menu_divider.dart'; | 12 import 'package:sky/widgets/menu_divider.dart'; |
| 14 import 'package:sky/widgets/menu_item.dart'; | 13 import 'package:sky/widgets/menu_item.dart'; |
| 15 import 'package:sky/widgets/modal_overlay.dart'; | 14 import 'package:sky/widgets/modal_overlay.dart'; |
| 16 import 'package:sky/widgets/navigator.dart'; | 15 import 'package:sky/widgets/navigator.dart'; |
| 17 import 'package:sky/widgets/popup_menu.dart'; | 16 import 'package:sky/widgets/popup_menu.dart'; |
| 18 import 'package:sky/widgets/radio.dart'; | 17 import 'package:sky/widgets/radio.dart'; |
| 19 import 'package:sky/widgets/scaffold.dart'; | 18 import 'package:sky/widgets/scaffold.dart'; |
| 20 import 'package:sky/widgets/tabs.dart'; | 19 import 'package:sky/widgets/tabs.dart'; |
| 20 import 'package:sky/widgets/theme.dart'; |
| 21 import 'package:sky/widgets/tool_bar.dart'; | 21 import 'package:sky/widgets/tool_bar.dart'; |
| 22 import 'package:sky/widgets/widget.dart'; | 22 import 'package:sky/widgets/widget.dart'; |
| 23 | 23 |
| 24 import 'stock_data.dart'; | 24 import 'stock_data.dart'; |
| 25 import 'stock_list.dart'; | 25 import 'stock_list.dart'; |
| 26 import 'stock_menu.dart'; | 26 import 'stock_menu.dart'; |
| 27 import 'stock_types.dart'; | 27 import 'stock_types.dart'; |
| 28 | 28 |
| 29 typedef void ModeUpdater(StockMode mode); | 29 typedef void ModeUpdater(StockMode mode); |
| 30 | 30 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 // TODO(abarth): Should we factor this into a SearchBar in the framework? | 212 // TODO(abarth): Should we factor this into a SearchBar in the framework? |
| 213 Widget buildSearchBar() { | 213 Widget buildSearchBar() { |
| 214 return new ToolBar( | 214 return new ToolBar( |
| 215 left: new IconButton( | 215 left: new IconButton( |
| 216 icon: 'navigation/arrow_back_grey600', | 216 icon: 'navigation/arrow_back_grey600', |
| 217 onPressed: _handleSearchEnd), | 217 onPressed: _handleSearchEnd), |
| 218 center: new Input( | 218 center: new Input( |
| 219 focused: true, | 219 focused: true, |
| 220 placeholder: 'Search stocks', | 220 placeholder: 'Search stocks', |
| 221 onChanged: _handleSearchQueryChanged), | 221 onChanged: _handleSearchQueryChanged), |
| 222 backgroundColor: colors.Grey[50] | 222 backgroundColor: Theme.of(this).canvasColor |
| 223 ); | 223 ); |
| 224 } | 224 } |
| 225 | 225 |
| 226 void addMenuToOverlays(List<Widget> overlays) { | 226 void addMenuToOverlays(List<Widget> overlays) { |
| 227 if (_menuController == null) | 227 if (_menuController == null) |
| 228 return; | 228 return; |
| 229 overlays.add(new ModalOverlay( | 229 overlays.add(new ModalOverlay( |
| 230 children: [new StockMenu( | 230 children: [new StockMenu( |
| 231 controller: _menuController, | 231 controller: _menuController, |
| 232 autorefresh: _autorefresh, | 232 autorefresh: _autorefresh, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 243 floatingActionButton: new FloatingActionButton( | 243 floatingActionButton: new FloatingActionButton( |
| 244 child: new Icon(type: 'content/add_white', size: 24) | 244 child: new Icon(type: 'content/add_white', size: 24) |
| 245 ), | 245 ), |
| 246 drawer: _drawerShowing ? buildDrawer() : null | 246 drawer: _drawerShowing ? buildDrawer() : null |
| 247 ), | 247 ), |
| 248 ]; | 248 ]; |
| 249 addMenuToOverlays(overlays); | 249 addMenuToOverlays(overlays); |
| 250 return new Stack(overlays); | 250 return new Stack(overlays); |
| 251 } | 251 } |
| 252 } | 252 } |
| OLD | NEW |