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

Side by Side Diff: sky/examples/fn/widgets/radio.dart

Issue 992033002: Change the name of Component.render to Component.build in Effen (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: README Created 5 years, 9 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/examples/fn/widgets/menuitem.dart ('k') | sky/examples/fn/widgets/toolbar.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 part of widgets; 1 part of widgets;
2 2
3 class Radio extends ButtonBase { 3 class Radio extends ButtonBase {
4 4
5 Object value; 5 Object value;
6 Object groupValue; 6 Object groupValue;
7 ValueChanged onChanged; 7 ValueChanged onChanged;
8 8
9 static Style _style = new Style(''' 9 static Style _style = new Style('''
10 transform: translateX(0); 10 transform: translateX(0);
(...skipping 27 matching lines...) Expand all
38 margin: 2px;''' 38 margin: 2px;'''
39 ); 39 );
40 40
41 Radio({ 41 Radio({
42 Object key, 42 Object key,
43 this.onChanged, 43 this.onChanged,
44 this.value, 44 this.value,
45 this.groupValue 45 this.groupValue
46 }) : super(key: key); 46 }) : super(key: key);
47 47
48 Node render() { 48 Node build() {
49 return new Container( 49 return new Container(
50 style: _highlight ? _highlightStyle : _style, 50 style: _highlight ? _highlightStyle : _style,
51 children: value == groupValue ? 51 children: value == groupValue ?
52 [super.render(), new Container( style : _dotStyle )] : [super.render() ] 52 [super.build(), new Container( style : _dotStyle )] : [super.build()]
53 )..events.listen('click', _handleClick); 53 )..events.listen('click', _handleClick);
54 } 54 }
55 55
56 void _handleClick(_) { 56 void _handleClick(_) {
57 onChanged(value); 57 onChanged(value);
58 } 58 }
59 } 59 }
OLDNEW
« no previous file with comments | « sky/examples/fn/widgets/menuitem.dart ('k') | sky/examples/fn/widgets/toolbar.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698