Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(673)

Side by Side Diff: sky/examples/stocks2/lib/stock_app.dart

Issue 1204523002: Material light and dark themes for Sky widgets (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix analyzer warning properly Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | sky/examples/stocks2/lib/stock_home.dart » ('j') | sky/sdk/lib/widgets/theme.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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; 6 import 'package:sky/theme/colors.dart' as colors;
7 import 'package:sky/theme/theme_data.dart'; 7 import 'package:sky/theme/theme_data.dart';
8 import 'package:sky/theme/typography.dart' as typography;
9 import 'package:sky/widgets/basic.dart'; 8 import 'package:sky/widgets/basic.dart';
10 import 'package:sky/widgets/navigator.dart'; 9 import 'package:sky/widgets/navigator.dart';
11 import 'package:sky/widgets/theme.dart'; 10 import 'package:sky/widgets/theme.dart';
12 import 'package:sky/widgets/widget.dart'; 11 import 'package:sky/widgets/widget.dart';
13 12
14 import 'stock_data.dart'; 13 import 'stock_data.dart';
15 import 'stock_home.dart'; 14 import 'stock_home.dart';
16 import 'stock_settings.dart'; 15 import 'stock_settings.dart';
17 16
18 class StocksApp extends App { 17 class StocksApp extends App {
(...skipping 25 matching lines...) Expand all
44 43
45 void onBack() { 44 void onBack() {
46 setState(() { 45 setState(() {
47 _navigationState.pop(); 46 _navigationState.pop();
48 }); 47 });
49 // TODO(jackson): Need a way to invoke default back behavior here 48 // TODO(jackson): Need a way to invoke default back behavior here
50 } 49 }
51 50
52 Widget build() { 51 Widget build() {
53 return new Theme( 52 return new Theme(
54 data: new ThemeData(color: colors.Purple, text: typography.white), 53 data: new ThemeData.light(
54 primary: colors.Purple,
55 accent: colors.RedAccent,
56 darkToolbar: true),
55 child: new Navigator(_navigationState) 57 child: new Navigator(_navigationState)
56 ); 58 );
57 } 59 }
58 } 60 }
59 61
60 void main() { 62 void main() {
61 print("starting stocks app!"); 63 print("starting stocks app!");
62 runApp(new StocksApp()); 64 runApp(new StocksApp());
63 SkyBinding.instance.onFrame = () { 65 SkyBinding.instance.onFrame = () {
64 // uncomment this for debugging: 66 // uncomment this for debugging:
65 // SkyBinding.instance.debugDumpRenderTree(); 67 // SkyBinding.instance.debugDumpRenderTree();
66 }; 68 };
67 } 69 }
OLDNEW
« no previous file with comments | « no previous file | sky/examples/stocks2/lib/stock_home.dart » ('j') | sky/sdk/lib/widgets/theme.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698