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

Side by Side Diff: sky/sdk/lib/widgets/icon_theme.dart

Issue 1235443002: Support for icon theming (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix tests Created 5 years, 5 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 | « sky/sdk/lib/widgets/icon.dart ('k') | sky/sdk/lib/widgets/menu_item.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
Hixie 2015/07/09 23:06:08 Put this in icon.dart, since only icons, and peopl
jackson 2015/07/09 23:16:19 Done.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 import 'basic.dart';
6 import 'widget.dart';
7
8 enum IconThemeColor { white, black }
9
10 class IconThemeData {
11 const IconThemeData({ this.color });
12 final IconThemeColor color;
13 }
14
15 class IconTheme extends Inherited {
16
17 IconTheme({
18 String key,
19 this.data,
20 Widget child
21 }) : super(key: key, child: child) {
22 assert(data != null);
23 assert(child != null);
24 }
25
26 final IconThemeData data;
27
28 static IconThemeData of(Component component) {
29 IconTheme result = component.inheritedOfType(IconTheme);
30 return result == null ? null : result.data;
31 }
32
33 bool syncShouldNotify(IconTheme old) => data != old.data;
34
35 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/widgets/icon.dart ('k') | sky/sdk/lib/widgets/menu_item.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698