| 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/app.dart'; | |
| 6 import 'package:sky/framework/editing2/input.dart'; | 5 import 'package:sky/framework/editing2/input.dart'; |
| 7 import 'package:sky/framework/rendering/box.dart'; | 6 import 'package:sky/framework/rendering/box.dart'; |
| 8 import 'package:sky/framework/theme2/colors.dart' as colors; | 7 import 'package:sky/framework/theme2/colors.dart' as colors; |
| 9 import 'package:sky/framework/widgets/drawer.dart'; | 8 import 'package:sky/framework/widgets/drawer.dart'; |
| 10 import 'package:sky/framework/widgets/drawer_header.dart'; | 9 import 'package:sky/framework/widgets/drawer_header.dart'; |
| 11 import 'package:sky/framework/widgets/floating_action_button.dart'; | 10 import 'package:sky/framework/widgets/floating_action_button.dart'; |
| 12 import 'package:sky/framework/widgets/icon.dart'; | 11 import 'package:sky/framework/widgets/icon.dart'; |
| 13 import 'package:sky/framework/widgets/icon_button.dart'; | 12 import 'package:sky/framework/widgets/icon_button.dart'; |
| 14 import 'package:sky/framework/widgets/menu_divider.dart'; | 13 import 'package:sky/framework/widgets/menu_divider.dart'; |
| 15 import 'package:sky/framework/widgets/menu_item.dart'; | 14 import 'package:sky/framework/widgets/menu_item.dart'; |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 )], | 195 )], |
| 197 onDismiss: _handleMenuHide)); | 196 onDismiss: _handleMenuHide)); |
| 198 } | 197 } |
| 199 | 198 |
| 200 UINode build() { | 199 UINode build() { |
| 201 List<UINode> overlays = [ | 200 List<UINode> overlays = [ |
| 202 new Scaffold( | 201 new Scaffold( |
| 203 toolbar: _isSearching ? buildSearchBar() : buildToolBar(), | 202 toolbar: _isSearching ? buildSearchBar() : buildToolBar(), |
| 204 body: new Stocklist(stocks: _stocks, query: _searchQuery), | 203 body: new Stocklist(stocks: _stocks, query: _searchQuery), |
| 205 floatingActionButton: new FloatingActionButton( | 204 floatingActionButton: new FloatingActionButton( |
| 206 content: new Icon(type: 'content/add_white', size: 24), | 205 child: new Icon(type: 'content/add_white', size: 24) |
| 207 level: 3), | 206 ), |
| 208 drawer: _drawerShowing ? buildDrawer() : null | 207 drawer: _drawerShowing ? buildDrawer() : null |
| 209 ), | 208 ), |
| 210 ]; | 209 ]; |
| 211 addMenuToOverlays(overlays); | 210 addMenuToOverlays(overlays); |
| 212 return new Stack(overlays); | 211 return new Stack(overlays); |
| 213 } | 212 } |
| 214 } | 213 } |
| 215 | 214 |
| 216 void main() { | 215 void main() { |
| 217 print("starting stocks app!"); | 216 print("starting stocks app!"); |
| 218 App app = new StocksApp(); | 217 App app = new StocksApp(); |
| 219 UINodeAppView.appView.onFrame = () { | 218 UINodeAppView.appView.onFrame = () { |
| 220 // uncomment this for debugging: | 219 // uncomment this for debugging: |
| 221 // app.appView.debugDumpRenderTree(); | 220 // app.appView.debugDumpRenderTree(); |
| 222 }; | 221 }; |
| 223 } | 222 } |
| OLD | NEW |