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

Side by Side Diff: sky/examples/fn/widgets/material.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/inksplash.dart ('k') | sky/examples/fn/widgets/menudivider.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 abstract class MaterialComponent extends Component { 3 abstract class MaterialComponent extends Component {
4 4
5 static const _splashesKey = const Object(); 5 static const _splashesKey = const Object();
6 6
7 static Style _style = new Style(''' 7 static Style _style = new Style('''
8 transform: translateX(0); 8 transform: translateX(0);
9 position: absolute; 9 position: absolute;
10 top: 0; 10 top: 0;
11 left: 0; 11 left: 0;
12 right: 0; 12 right: 0;
13 bottom: 0''' 13 bottom: 0'''
14 ); 14 );
15 15
16 LinkedHashSet<SplashAnimation> _splashes; 16 LinkedHashSet<SplashAnimation> _splashes;
17 17
18 MaterialComponent({ Object key }) : super(key: key); 18 MaterialComponent({ Object key }) : super(key: key);
19 19
20 Node render() { 20 Node build() {
21 List<Node> children = []; 21 List<Node> children = [];
22 22
23 if (_splashes != null) { 23 if (_splashes != null) {
24 children.addAll(_splashes.map((s) => new InkSplash(s.onStyleChanged))); 24 children.addAll(_splashes.map((s) => new InkSplash(s.onStyleChanged)));
25 } 25 }
26 26
27 return new Container( 27 return new Container(
28 style: _style, 28 style: _style,
29 children: children, 29 children: children,
30 key: _splashesKey 30 key: _splashesKey
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 setState(() { 73 setState(() {
74 _splashes.remove(splash); 74 _splashes.remove(splash);
75 if (_splashes.length == 0) { 75 if (_splashes.length == 0) {
76 _splashes = null; 76 _splashes = null;
77 } 77 }
78 }); 78 });
79 } 79 }
80 } 80 }
OLDNEW
« no previous file with comments | « sky/examples/fn/widgets/inksplash.dart ('k') | sky/examples/fn/widgets/menudivider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698