| 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/theme/colors.dart' as colors; | 5 import 'package:sky/theme/colors.dart' as colors; |
| 6 import 'package:sky/theme/typography.dart' as typography; | 6 import 'package:sky/theme/typography.dart' as typography; |
| 7 import 'package:sky/widgets/basic.dart'; | 7 import 'package:sky/widgets/basic.dart'; |
| 8 import 'package:sky/widgets/default_text_style.dart'; | 8 import 'package:sky/widgets/default_text_style.dart'; |
| 9 import 'package:sky/widgets/navigator.dart'; | 9 import 'package:sky/widgets/navigator.dart'; |
| 10 import 'package:sky/widgets/theme.dart'; | 10 import 'package:sky/widgets/theme.dart'; |
| 11 import 'package:sky/widgets/widget.dart'; | 11 import 'package:sky/widgets/widget.dart'; |
| 12 import 'package:sky/widgets/task_description.dart'; |
| 12 | 13 |
| 13 import 'stock_data.dart'; | 14 import 'stock_data.dart'; |
| 14 import 'stock_home.dart'; | 15 import 'stock_home.dart'; |
| 15 import 'stock_settings.dart'; | 16 import 'stock_settings.dart'; |
| 16 import 'stock_types.dart'; | 17 import 'stock_types.dart'; |
| 17 | 18 |
| 18 class StocksApp extends App { | 19 class StocksApp extends App { |
| 19 | 20 |
| 20 NavigationState _navigationState; | 21 NavigationState _navigationState; |
| 21 StocksApp() { | 22 StocksApp() { |
| 22 _navigationState = new NavigationState([ | 23 _navigationState = new NavigationState([ |
| 23 new Route( | 24 new Route( |
| 24 name: '/', | 25 name: '/', |
| 25 builder: (navigator, route) => new StockHome(navigator, _stocks, optimis
mSetting, modeUpdater) | 26 builder: (navigator, route) => new StockHome(navigator, _stocks, optimis
mSetting, modeUpdater) |
| 26 ), | 27 ), |
| 27 new Route( | 28 new Route( |
| 28 name: '/settings', | 29 name: '/settings', |
| 29 builder: (navigator, route) => new StockSettings(navigator, optimismSett
ing, backupSetting, settingsUpdater) | 30 builder: (navigator, route) => new StockSettings(navigator, optimismSett
ing, backupSetting, settingsUpdater) |
| 30 ), | 31 ), |
| 31 ]); | 32 ]); |
| 32 } | 33 } |
| 33 | 34 |
| 34 void onBack() { | 35 void onBack() { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 theme = new ThemeData( | 81 theme = new ThemeData( |
| 81 brightness: ThemeBrightness.dark, | 82 brightness: ThemeBrightness.dark, |
| 82 accentColor: colors.RedAccent[200] | 83 accentColor: colors.RedAccent[200] |
| 83 ); | 84 ); |
| 84 } | 85 } |
| 85 | 86 |
| 86 return new Theme( | 87 return new Theme( |
| 87 data: theme, | 88 data: theme, |
| 88 child: new DefaultTextStyle( | 89 child: new DefaultTextStyle( |
| 89 style: typography.error, // if you see this, you've forgotten to corre
ctly configure the text style! | 90 style: typography.error, // if you see this, you've forgotten to corre
ctly configure the text style! |
| 90 child: new Navigator(_navigationState) | 91 child: new TaskDescription( |
| 92 label: 'Stocks', |
| 93 child: new Navigator(_navigationState) |
| 94 ) |
| 91 ) | 95 ) |
| 92 ); | 96 ); |
| 93 } | 97 } |
| 94 } | 98 } |
| 95 | 99 |
| 96 void main() { | 100 void main() { |
| 97 runApp(new StocksApp()); | 101 runApp(new StocksApp()); |
| 98 } | 102 } |
| OLD | NEW |