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

Unified Diff: sky/sdk/lib/widgets/material.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 side-by-side diff with in-line comments
Download patch
Index: sky/sdk/lib/widgets/material.dart
diff --git a/sky/sdk/lib/widgets/material.dart b/sky/sdk/lib/widgets/material.dart
index f178fc2cbb0b87e8ca214437e824f20d3f9190b5..73b52cb66f8372c9efd909ff6fa42a766af5cf7b 100644
--- a/sky/sdk/lib/widgets/material.dart
+++ b/sky/sdk/lib/widgets/material.dart
@@ -3,10 +3,11 @@
// found in the LICENSE file.
import '../painting/box_painter.dart';
-import '../theme/colors.dart';
import '../theme/edges.dart';
import '../theme/shadows.dart';
import 'basic.dart';
+import 'default_text_style.dart';
+import 'theme.dart';
class Material extends Component {
@@ -30,10 +31,10 @@ class Material extends Component {
decoration: new BoxDecoration(
boxShadow: shadows[level],
borderRadius: edges[edge],
- backgroundColor: color == null ? Grey[50] : color,
+ backgroundColor: color == null ? Theme.of(this).backgroundColor : color,
shape: edge == MaterialEdge.circle ? Shape.circle : Shape.rectangle
),
- child: child
+ child: new DefaultTextStyle(style: Theme.of(this).text.body1, child: child)
);
}

Powered by Google App Engine
This is Rietveld 408576698