| 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/framework/components2/tool_bar.dart'; | 5 import 'package:sky/framework/components2/tool_bar.dart'; |
| 6 // import 'package:sky/framework/components2/drawer.dart'; | 6 // import 'package:sky/framework/components2/drawer.dart'; |
| 7 // import 'package:sky/framework/components2/drawer_header.dart'; | 7 // import 'package:sky/framework/components2/drawer_header.dart'; |
| 8 // import 'package:sky/framework/components2/floating_action_button.dart'; | 8 // import 'package:sky/framework/components2/floating_action_button.dart'; |
| 9 // import 'package:sky/framework/components2/icon.dart'; | 9 // import 'package:sky/framework/components2/icon.dart'; |
| 10 import 'package:sky/framework/components2/icon_button.dart'; | 10 import 'package:sky/framework/components2/icon_button.dart'; |
| 11 // import 'package:sky/framework/components2/input.dart'; | 11 // import 'package:sky/framework/components2/input.dart'; |
| 12 // import 'package:sky/framework/components2/menu_divider.dart'; | 12 // import 'package:sky/framework/components2/menu_divider.dart'; |
| 13 // import 'package:sky/framework/components2/menu_item.dart'; | 13 // import 'package:sky/framework/components2/menu_item.dart'; |
| 14 // import 'package:sky/framework/components2/modal_overlay.dart'; | 14 // import 'package:sky/framework/components2/modal_overlay.dart'; |
| 15 // import 'package:sky/framework/components2/popup_menu.dart'; | 15 // import 'package:sky/framework/components2/popup_menu.dart'; |
| 16 // import 'package:sky/framework/components2/radio.dart'; | 16 // import 'package:sky/framework/components2/radio.dart'; |
| 17 import 'package:sky/framework/components2/scaffold.dart'; | 17 import 'package:sky/framework/components2/scaffold.dart'; |
| 18 import 'package:sky/framework/fn2.dart'; | 18 import 'package:sky/framework/fn2.dart'; |
| 19 import 'package:sky/framework/theme/typography.dart' as typography; | 19 import 'package:sky/framework/theme2/typography.dart' as typography; |
| 20 import 'package:sky/framework/theme/colors.dart'; | 20 import 'package:sky/framework/theme2/colors.dart' as colors; |
| 21 import 'stock_data.dart'; | 21 import 'stock_data.dart'; |
| 22 import 'package:sky/framework/rendering/box.dart'; | 22 import 'package:sky/framework/rendering/box.dart'; |
| 23 // import 'stock_list.dart'; | 23 // import 'stock_list.dart'; |
| 24 // import 'stock_menu.dart'; | 24 // import 'stock_menu.dart'; |
| 25 | 25 |
| 26 import 'dart:async'; | 26 import 'dart:async'; |
| 27 import 'dart:sky' as sky; | 27 import 'dart:sky' as sky; |
| 28 | 28 |
| 29 enum StockMode { Optimistic, Pessimistic } | 29 enum StockMode { Optimistic, Pessimistic } |
| 30 | 30 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 onGestureTap: (_) => true), // _drawerController.toggle), | 166 onGestureTap: (_) => true), // _drawerController.toggle), |
| 167 center: new Text('Stocks'), | 167 center: new Text('Stocks'), |
| 168 right: [ | 168 right: [ |
| 169 new IconButton( | 169 new IconButton( |
| 170 icon: 'action/search_white', | 170 icon: 'action/search_white', |
| 171 onGestureTap: _handleSearchBegin), | 171 onGestureTap: _handleSearchBegin), |
| 172 new IconButton( | 172 new IconButton( |
| 173 icon: 'navigation/more_vert_white', | 173 icon: 'navigation/more_vert_white', |
| 174 onGestureTap: _handleMenuShow) | 174 onGestureTap: _handleMenuShow) |
| 175 ], | 175 ], |
| 176 backgroundColor: colorFromCSSHexColorString(Purple[500]) | 176 backgroundColor: colors.Purple[500] |
| 177 ); | 177 ); |
| 178 } | 178 } |
| 179 | 179 |
| 180 // TODO(abarth): Should we factor this into a SearchBar in the framework? | 180 // TODO(abarth): Should we factor this into a SearchBar in the framework? |
| 181 UINode buildSearchBar() { | 181 UINode buildSearchBar() { |
| 182 // return new StyleNode( | 182 // return new StyleNode( |
| 183 // new ToolBar( | 183 // new ToolBar( |
| 184 // left: new IconButton( | 184 // left: new IconButton( |
| 185 // icon: 'navigation/arrow_back_grey600', | 185 // icon: 'navigation/arrow_back_grey600', |
| 186 // onGestureTap: _handleSearchEnd), | 186 // onGestureTap: _handleSearchEnd), |
| (...skipping 28 matching lines...) Expand all Loading... |
| 215 // drawer: _drawerShowing ? buildDrawer() : null, | 215 // drawer: _drawerShowing ? buildDrawer() : null, |
| 216 // overlays: overlays | 216 // overlays: overlays |
| 217 ); | 217 ); |
| 218 } | 218 } |
| 219 } | 219 } |
| 220 | 220 |
| 221 void main() { | 221 void main() { |
| 222 print("starting stocks app!"); | 222 print("starting stocks app!"); |
| 223 new StocksApp(); | 223 new StocksApp(); |
| 224 } | 224 } |
| OLD | NEW |