| 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/menu_divider.dart'; | 11 import 'package:sky/framework/components2/menu_divider.dart'; |
| 12 import 'package:sky/framework/components2/menu_item.dart'; | 12 import 'package:sky/framework/components2/menu_item.dart'; |
| 13 import 'package:sky/framework/components2/input.dart'; | 13 import 'package:sky/framework/components2/input.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/theme2/typography.dart' as typography; | 19 import 'package:sky/framework/theme2/typography.dart' as typography; |
| 20 import 'package:sky/framework/theme2/colors.dart' as colors; | 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 'package:sky/framework/rendering/paragraph.dart'; |
| 23 import 'stock_list.dart'; | 24 import 'stock_list.dart'; |
| 24 import 'stock_menu.dart'; | 25 import 'stock_menu.dart'; |
| 25 | 26 |
| 26 import 'dart:async'; | 27 import 'dart:async'; |
| 27 import 'dart:sky' as sky; | 28 import 'dart:sky' as sky; |
| 28 | 29 |
| 29 enum StockMode { optimistic, pessimistic } | 30 enum StockMode { optimistic, pessimistic } |
| 30 | 31 |
| 31 class StocksApp extends App { | 32 class StocksApp extends App { |
| 32 | 33 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 children: [new Text('Help & Feedback')]) | 155 children: [new Text('Help & Feedback')]) |
| 155 ] | 156 ] |
| 156 ); | 157 ); |
| 157 } | 158 } |
| 158 | 159 |
| 159 UINode buildToolBar() { | 160 UINode buildToolBar() { |
| 160 return new ToolBar( | 161 return new ToolBar( |
| 161 left: new IconButton( | 162 left: new IconButton( |
| 162 icon: 'navigation/menu_white', | 163 icon: 'navigation/menu_white', |
| 163 onGestureTap: (_) => _drawerController.toggle()), | 164 onGestureTap: (_) => _drawerController.toggle()), |
| 164 center: new Text('Stocks'), | 165 center: new Text('Stocks', style: new TextStyle(color: const Color(0xFFF
FFFFF))), |
| 165 right: [ | 166 right: [ |
| 166 new IconButton( | 167 new IconButton( |
| 167 icon: 'action/search_white', | 168 icon: 'action/search_white', |
| 168 onGestureTap: _handleSearchBegin), | 169 onGestureTap: _handleSearchBegin), |
| 169 new IconButton( | 170 new IconButton( |
| 170 icon: 'navigation/more_vert_white', | 171 icon: 'navigation/more_vert_white', |
| 171 onGestureTap: _handleMenuShow) | 172 onGestureTap: _handleMenuShow) |
| 172 ], | 173 ], |
| 173 backgroundColor: colors.Purple[500] | 174 backgroundColor: colors.Purple[500] |
| 174 ); | 175 ); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 } | 218 } |
| 218 | 219 |
| 219 void main() { | 220 void main() { |
| 220 print("starting stocks app!"); | 221 print("starting stocks app!"); |
| 221 App app = new StocksApp(); | 222 App app = new StocksApp(); |
| 222 app.appView.onFrame = () { | 223 app.appView.onFrame = () { |
| 223 // uncomment this for debugging: | 224 // uncomment this for debugging: |
| 224 // app.appView.debugDumpRenderTree(); | 225 // app.appView.debugDumpRenderTree(); |
| 225 }; | 226 }; |
| 226 } | 227 } |
| OLD | NEW |