| 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 '../theme/theme_data.dart'; | 5 import '../theme/theme_data.dart'; |
| 6 import 'basic.dart'; | 6 import 'basic.dart'; |
| 7 import 'widget.dart'; | 7 import 'widget.dart'; |
| 8 | 8 |
| 9 export '../theme/theme_data.dart' show ThemeData, ThemeBrightness; | 9 export '../theme/theme_data.dart' show ThemeData, ThemeBrightness; |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 final ThemeData data; | 22 final ThemeData data; |
| 23 | 23 |
| 24 static final ThemeData _kFallbackTheme = new ThemeData.fallback(); | 24 static final ThemeData _kFallbackTheme = new ThemeData.fallback(); |
| 25 | 25 |
| 26 static ThemeData of(Component component) { | 26 static ThemeData of(Component component) { |
| 27 Theme theme = component.inheritedOfType(Theme); | 27 Theme theme = component.inheritedOfType(Theme); |
| 28 return theme == null ? _kFallbackTheme : theme.data; | 28 return theme == null ? _kFallbackTheme : theme.data; |
| 29 } | 29 } |
| 30 | 30 |
| 31 @override |
| 31 bool syncShouldNotify(Theme old) => data != old.data; | 32 bool syncShouldNotify(Theme old) => data != old.data; |
| 32 | 33 |
| 33 } | 34 } |
| OLD | NEW |