Index: sky/sdk/lib/widgets/dialog.dart |
diff --git a/sky/sdk/lib/widgets/dialog.dart b/sky/sdk/lib/widgets/dialog.dart |
index 0f4c0d0de0626e2dba602c0e0c024616f5294fb7..027cd0cb0e669da6f6fd80a81e07e4755823d80d 100644 |
--- a/sky/sdk/lib/widgets/dialog.dart |
+++ b/sky/sdk/lib/widgets/dialog.dart |
@@ -2,8 +2,10 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+import '../theme/colors.dart' as colors; |
import 'basic.dart'; |
import 'material.dart'; |
+import "theme.dart"; |
class Dialog extends Component { |
Dialog({ |
@@ -19,6 +21,15 @@ class Dialog extends Component { |
final Widget actions; |
final Function onDismiss; |
+ Color get color { |
+ switch (Theme.of(this).brightness) { |
+ case ThemeBrightness.light: |
+ return colors.White; |
+ case ThemeBrightness.dark: |
+ return colors.Grey[800]; |
+ } |
+ } |
+ |
Widget build() { |
Container mask = new Container( |
decoration: const BoxDecoration( |
@@ -45,6 +56,7 @@ class Dialog extends Component { |
constraints: new BoxConstraints(minWidth: 280.0), |
child: new Material( |
level: 4, |
+ color: color, |
child: new ShrinkWrapWidth( |
child: new Block(children) |
) |