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

Side by Side Diff: sky/sdk/lib/widgets/flat_button.dart

Issue 1201273002: Add a confirmation dialog to stock app Settings page and style it by default (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: remove unused import 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 unified diff | Download patch
OLDNEW
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 'dart:sky' show Color;
abarth-chromium 2015/06/23 20:52:51 Color should already be available from basic.dart.
jackson 2015/06/23 21:02:35 Done.
6
5 import '../theme/colors.dart'; 7 import '../theme/colors.dart';
6 import 'basic.dart'; 8 import 'basic.dart';
7 import 'material_button.dart'; 9 import 'material_button.dart';
8 import 'theme.dart'; 10 import 'theme.dart';
9 11
10 class FlatButton extends MaterialButton { 12 class FlatButton extends MaterialButton {
11 FlatButton({ 13 FlatButton({
12 String key, 14 String key,
13 Widget child, 15 Widget child,
14 bool enabled: true, 16 bool enabled: true,
15 Function onPressed 17 Function onPressed
16 }) : super(key: key, 18 }) : super(key: key,
17 child: child, 19 child: child,
18 enabled: enabled, 20 enabled: enabled,
19 onPressed: onPressed); 21 onPressed: onPressed);
20 22
21 Color get color { 23 Color get color {
22 if (!enabled || !highlight) 24 if (!enabled || !highlight)
23 return null; 25 return const Color(0x00000000);
24 switch (Theme.of(this).brightness) { 26 switch (Theme.of(this).brightness) {
25 case ThemeBrightness.light: 27 case ThemeBrightness.light:
26 return Grey[400]; 28 return Grey[400];
27 case ThemeBrightness.dark: 29 case ThemeBrightness.dark:
28 return Grey[200]; 30 return Grey[200];
29 } 31 }
30 } 32 }
31 33
32 int get level => null; 34 int get level => null;
33 } 35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698