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/rendering/box.dart'; |
5 import 'package:sky/widgets/basic.dart'; | 6 import 'package:sky/widgets/basic.dart'; |
6 import 'package:sky/widgets/navigator.dart'; | 7 import 'package:sky/widgets/navigator.dart'; |
7 import 'package:sky/widgets/widget.dart'; | 8 import 'package:sky/widgets/widget.dart'; |
8 | 9 |
9 import 'stock_home.dart'; | 10 import 'stock_home.dart'; |
10 import 'stock_settings.dart'; | 11 import 'stock_settings.dart'; |
11 | 12 |
12 class StocksApp extends App { | 13 class StocksApp extends App { |
| 14 |
| 15 StocksApp({ RenderView renderViewOverride }) : super(renderViewOverride: rende
rViewOverride); |
| 16 |
13 Widget build() { | 17 Widget build() { |
14 return new Navigator( | 18 return new Navigator( |
15 routes: [ | 19 routes: [ |
16 new Route( | 20 new Route( |
17 name: '/', | 21 name: '/', |
18 builder: (navigator) => new StockHome(navigator) | 22 builder: (navigator) => new StockHome(navigator) |
19 ), | 23 ), |
20 new Route( | 24 new Route( |
21 name: '/settings', | 25 name: '/settings', |
22 builder: (navigator) => new StockSettings(navigator) | 26 builder: (navigator) => new StockSettings(navigator) |
23 ), | 27 ), |
24 ] | 28 ] |
25 ); | 29 ); |
26 } | 30 } |
27 } | 31 } |
28 | 32 |
29 void main() { | 33 void main() { |
30 print("starting stocks app!"); | 34 print("starting stocks app!"); |
31 App app = new StocksApp(); | 35 App app = new StocksApp(); |
32 WidgetAppView.appView.onFrame = () { | 36 WidgetAppView.appView.onFrame = () { |
33 // uncomment this for debugging: | 37 // uncomment this for debugging: |
34 // WidgetAppView.appView.debugDumpRenderTree(); | 38 // WidgetAppView.appView.debugDumpRenderTree(); |
35 }; | 39 }; |
36 } | 40 } |
OLD | NEW |