| 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'; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 }); | 67 }); |
| 68 }); | 68 }); |
| 69 } | 69 } |
| 70 | 70 |
| 71 Widget build() { | 71 Widget build() { |
| 72 | 72 |
| 73 ThemeData theme; | 73 ThemeData theme; |
| 74 if (optimismSetting == StockMode.optimistic) { | 74 if (optimismSetting == StockMode.optimistic) { |
| 75 theme = new ThemeData( | 75 theme = new ThemeData( |
| 76 brightness: ThemeBrightness.light, | 76 brightness: ThemeBrightness.light, |
| 77 primarySwatch: colors.Purple, | 77 primarySwatch: colors.Purple |
| 78 floatingActionButtonColor: colors.RedAccent[200] | |
| 79 ); | 78 ); |
| 80 } else { | 79 } else { |
| 81 theme = new ThemeData( | 80 theme = new ThemeData( |
| 82 brightness: ThemeBrightness.dark, | 81 brightness: ThemeBrightness.dark, |
| 83 accentColor: colors.RedAccent[200] | 82 accentColor: colors.RedAccent[200] |
| 84 ); | 83 ); |
| 85 } | 84 } |
| 86 | 85 |
| 87 return new Theme( | 86 return new Theme( |
| 88 data: theme, | 87 data: theme, |
| 89 child: new DefaultTextStyle( | 88 child: new DefaultTextStyle( |
| 90 style: typography.error, // if you see this, you've forgotten to corre
ctly configure the text style! | 89 style: typography.error, // if you see this, you've forgotten to corre
ctly configure the text style! |
| 91 child: new TaskDescription( | 90 child: new TaskDescription( |
| 92 label: 'Stocks', | 91 label: 'Stocks', |
| 93 child: new Navigator(_navigationState) | 92 child: new Navigator(_navigationState) |
| 94 ) | 93 ) |
| 95 ) | 94 ) |
| 96 ); | 95 ); |
| 97 } | 96 } |
| 98 } | 97 } |
| 99 | 98 |
| 100 void main() { | 99 void main() { |
| 101 runApp(new StocksApp()); | 100 runApp(new StocksApp()); |
| 102 } | 101 } |
| OLD | NEW |