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

Unified Diff: sky/sdk/lib/widgets/flat_button.dart

Issue 1192773004: Teach Sky buttons and dialogs how to use the new Theme system (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase 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
« no previous file with comments | « sky/sdk/lib/widgets/dialog.dart ('k') | sky/sdk/lib/widgets/material.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/widgets/flat_button.dart
diff --git a/sky/sdk/lib/widgets/flat_button.dart b/sky/sdk/lib/widgets/flat_button.dart
index 017e5458900d7b50eb4d12eed4ca697c4a5e1d4e..c4b65cceed3f7e497121c309dd00cff6f6254490 100644
--- a/sky/sdk/lib/widgets/flat_button.dart
+++ b/sky/sdk/lib/widgets/flat_button.dart
@@ -5,29 +5,26 @@
import '../theme/colors.dart';
import 'basic.dart';
import 'material_button.dart';
-
-export 'material_button.dart' show MaterialButtonTheme;
+import 'theme.dart';
class FlatButton extends MaterialButton {
FlatButton({
String key,
Widget child,
bool enabled: true,
- Function onPressed,
- MaterialButtonTheme theme: MaterialButtonTheme.light
+ Function onPressed
}) : super(key: key,
child: child,
enabled: enabled,
- onPressed: onPressed,
- theme: theme);
+ onPressed: onPressed);
Color get color {
if (!enabled || !highlight)
return null;
- switch (theme) {
- case MaterialButtonTheme.light:
+ switch (Theme.of(this).brightness) {
+ case ThemeBrightness.light:
return Grey[400];
- case MaterialButtonTheme.dark:
+ case ThemeBrightness.dark:
return Grey[200];
}
}
« no previous file with comments | « sky/sdk/lib/widgets/dialog.dart ('k') | sky/sdk/lib/widgets/material.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698