| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 setState(() { | 61 setState(() { |
| 62 data.appendTo(_stocks); | 62 data.appendTo(_stocks); |
| 63 }); | 63 }); |
| 64 }); | 64 }); |
| 65 } | 65 } |
| 66 | 66 |
| 67 Widget build() { | 67 Widget build() { |
| 68 | 68 |
| 69 ThemeData theme; | 69 ThemeData theme; |
| 70 if (optimismSetting == StockMode.optimistic) { | 70 if (optimismSetting == StockMode.optimistic) { |
| 71 theme = new ThemeData.light( | 71 theme = new ThemeData( |
| 72 primary: colors.Purple, | 72 brightness: ThemeBrightness.light, |
| 73 accent: colors.RedAccent, | 73 primarySwatch: colors.Purple, |
| 74 darkToolbar: true | 74 accentColor: colors.RedAccent[200] |
| 75 ); | 75 ); |
| 76 } else { | 76 } else { |
| 77 theme = new ThemeData.dark( | 77 theme = new ThemeData( |
| 78 primary: colors.Red, | 78 brightness: ThemeBrightness.dark, |
| 79 accent: colors.PurpleAccent | 79 accentColor: colors.RedAccent[200] |
| 80 ); | 80 ); |
| 81 } | 81 } |
| 82 | 82 |
| 83 return new Theme( | 83 return new Theme( |
| 84 data: theme, | 84 data: theme, |
| 85 child: new DefaultTextStyle( | 85 child: new DefaultTextStyle( |
| 86 style: typography.error, // if you see this, you've forgotten to corre
ctly configure the text style! | 86 style: typography.error, // if you see this, you've forgotten to corre
ctly configure the text style! |
| 87 child: new Navigator(_navigationState) | 87 child: new Navigator(_navigationState) |
| 88 ) | 88 ) |
| 89 ); | 89 ); |
| 90 } | 90 } |
| 91 } | 91 } |
| 92 | 92 |
| 93 void main() { | 93 void main() { |
| 94 runApp(new StocksApp()); | 94 runApp(new StocksApp()); |
| 95 } | 95 } |
| OLD | NEW |