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

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

Issue 1173293005: Make UINode's key a String (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: nit 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
« no previous file with comments | « sky/sdk/lib/widgets/radio.dart ('k') | sky/sdk/lib/widgets/scaffold.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 '../theme2/colors.dart'; 5 import '../theme2/colors.dart';
6 import '../theme2/edges.dart'; 6 import '../theme2/edges.dart';
7 import 'basic.dart'; 7 import 'basic.dart';
8 import 'button_base.dart'; 8 import 'button_base.dart';
9 import 'ink_well.dart'; 9 import 'ink_well.dart';
10 import 'material.dart'; 10 import 'material.dart';
11 11
12 enum RaisedButtonTheme { light, dark } 12 enum RaisedButtonTheme { light, dark }
13 13
14 class RaisedButton extends ButtonBase { 14 class RaisedButton extends ButtonBase {
15 15
16 RaisedButton({ 16 RaisedButton({
17 Object key, 17 String key,
18 this.child, 18 this.child,
19 this.enabled: true, 19 this.enabled: true,
20 this.onPressed, 20 this.onPressed,
21 this.theme: RaisedButtonTheme.light 21 this.theme: RaisedButtonTheme.light
22 }) : super(key: key); 22 }) : super(key: key);
23 23
24 UINode child; 24 UINode child;
25 bool enabled; 25 bool enabled;
26 Function onPressed; 26 Function onPressed;
27 RaisedButtonTheme theme; 27 RaisedButtonTheme theme;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 child: enabled ? new InkWell(child: contents) : contents, 68 child: enabled ? new InkWell(child: contents) : contents,
69 level: enabled ? (highlight ? 2 : 1) : 0, 69 level: enabled ? (highlight ? 2 : 1) : 0,
70 color: color 70 color: color
71 ) 71 )
72 ), 72 ),
73 onGestureTap: (_) { if (onPressed != null && enabled) onPressed(); } 73 onGestureTap: (_) { if (onPressed != null && enabled) onPressed(); }
74 ); 74 );
75 } 75 }
76 76
77 } 77 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/widgets/radio.dart ('k') | sky/sdk/lib/widgets/scaffold.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698