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

Side by Side Diff: sky/sdk/lib/theme/theme_data.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
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 'dart:sky'; 5 import 'dart:sky';
6 6
7 import 'typography.dart'; 7 import 'typography.dart' as typography;
8 import 'colors.dart' as colors;
8 9
9 class ThemeData { 10 class ThemeData {
10 const ThemeData({ this.text, this.color }); 11
11 final TextTheme text; 12 ThemeData.light({
12 final Map<int, Color> color; 13 this.primary,
14 this.accent,
15 bool darkToolbar: false })
16 : toolbarText = darkToolbar ? typography.white : typography.black,
17 text = typography.black,
18 backgroundColor = colors.Grey[50],
19 dialogColor = colors.White;
20
21 ThemeData.dark({ this.primary, this.accent })
22 : toolbarText = typography.white,
23 text = typography.white,
24 backgroundColor = colors.Grey[850],
25 dialogColor = colors.Grey[800];
26
27 ThemeData.fallback()
28 : primary = colors.Indigo,
29 accent = colors.PinkAccent,
30 toolbarText = typography.white,
31 text = typography.black,
32 backgroundColor = colors.Grey[50],
33 dialogColor = colors.White;
34
35 final Map<int, Color> primary;
36 final Map<int, Color> accent;
37 final typography.TextTheme text;
38 final typography.TextTheme toolbarText;
39 final Color backgroundColor;
40 final Color dialogColor;
13 } 41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698