Index: sky/sdk/lib/widgets/theme.dart |
diff --git a/sky/sdk/lib/widgets/theme.dart b/sky/sdk/lib/widgets/theme.dart |
index 09f3d0800f4c19b00d0e87e0adaf3dde9da92d8d..f2ef760d7581a2b56efc2ba816d3dbc1ceda4fda 100644 |
--- a/sky/sdk/lib/widgets/theme.dart |
+++ b/sky/sdk/lib/widgets/theme.dart |
@@ -19,10 +19,10 @@ class Theme extends Inherited { |
final ThemeData data; |
+ static ThemeData _kFallbackTheme = new ThemeData.fallback(); |
abarth-chromium
2015/06/23 02:11:36
final
jackson
2015/06/23 17:14:09
Fixed in https://codereview.chromium.org/119277300
|
+ |
static ThemeData of(Component component) { |
Theme theme = component.inheritedOfType(Theme); |
- // If you hit this assert, you need to wrap your Component in a Theme |
- assert(theme != null); |
- return theme.data; |
+ return theme == null ? _kFallbackTheme : theme.data; |
} |
} |