| 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/sky_binding.dart'; | 5 import 'package:sky/rendering/sky_binding.dart'; |
| 6 import 'package:sky/theme/colors.dart' as colors; |
| 7 import 'package:sky/theme/theme_data.dart'; |
| 8 import 'package:sky/theme/typography.dart' as typography; |
| 6 import 'package:sky/widgets/basic.dart'; | 9 import 'package:sky/widgets/basic.dart'; |
| 7 import 'package:sky/widgets/navigator.dart'; | 10 import 'package:sky/widgets/navigator.dart'; |
| 11 import 'package:sky/widgets/theme.dart'; |
| 8 import 'package:sky/widgets/widget.dart'; | 12 import 'package:sky/widgets/widget.dart'; |
| 9 | 13 |
| 10 import 'stock_data.dart'; | 14 import 'stock_data.dart'; |
| 11 import 'stock_home.dart'; | 15 import 'stock_home.dart'; |
| 12 import 'stock_settings.dart'; | 16 import 'stock_settings.dart'; |
| 13 | 17 |
| 14 class StocksApp extends App { | 18 class StocksApp extends App { |
| 15 | 19 |
| 16 StocksApp() { | 20 StocksApp() { |
| 17 _navigationState = new NavigationState([ | 21 _navigationState = new NavigationState([ |
| (...skipping 21 matching lines...) Expand all Loading... |
| 39 NavigationState _navigationState; | 43 NavigationState _navigationState; |
| 40 | 44 |
| 41 void onBack() { | 45 void onBack() { |
| 42 setState(() { | 46 setState(() { |
| 43 _navigationState.pop(); | 47 _navigationState.pop(); |
| 44 }); | 48 }); |
| 45 // TODO(jackson): Need a way to invoke default back behavior here | 49 // TODO(jackson): Need a way to invoke default back behavior here |
| 46 } | 50 } |
| 47 | 51 |
| 48 Widget build() { | 52 Widget build() { |
| 49 return new Navigator(_navigationState); | 53 return new Theme( |
| 54 data: new ThemeData(color: colors.Purple, text: typography.white), |
| 55 child: new Navigator(_navigationState) |
| 56 ); |
| 50 } | 57 } |
| 51 } | 58 } |
| 52 | 59 |
| 53 void main() { | 60 void main() { |
| 54 print("starting stocks app!"); | 61 print("starting stocks app!"); |
| 55 runApp(new StocksApp()); | 62 runApp(new StocksApp()); |
| 56 SkyBinding.instance.onFrame = () { | 63 SkyBinding.instance.onFrame = () { |
| 57 // uncomment this for debugging: | 64 // uncomment this for debugging: |
| 58 // SkyBinding.instance.debugDumpRenderTree(); | 65 // SkyBinding.instance.debugDumpRenderTree(); |
| 59 }; | 66 }; |
| 60 } | 67 } |
| OLD | NEW |