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

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

Issue 987613002: Make stocksapp.dart almost pass the dart analyzer. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
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;
(...skipping 15 matching lines...) Expand all
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
31 )..events.listen('gesturescrollstart', _cancelSplashes) 31 )..events.listen('gesturescrollstart', _cancelSplashes)
32 ..events.listen('wheel', _cancelSplashes) 32 ..events.listen('wheel', _cancelSplashes)
33 ..events.listen('pointerdown', _startSplash); 33 ..events.listen('pointerdown', _startSplash);
34 } 34 }
35 35
36 sky.ClientRect _getBoundingRect() => getRoot().getBoundingClientRect(); 36 sky.ClientRect _getBoundingRect() => (getRoot() as sky.Element).getBoundingCli entRect();
37 37
38 void _startSplash(sky.Event event) { 38 void _startSplash(sky.PointerEvent event) {
39 setState(() { 39 setState(() {
40 if (_splashes == null) { 40 if (_splashes == null) {
41 _splashes = new LinkedHashSet<SplashAnimation>(); 41 _splashes = new LinkedHashSet<SplashAnimation>();
42 } 42 }
43 43
44 var splash; 44 var splash;
45 splash = new SplashAnimation(_getBoundingRect(), event.x, event.y, 45 splash = new SplashAnimation(_getBoundingRect(), event.x, event.y,
46 onDone: () { _splashDone(splash); }); 46 onDone: () { _splashDone(splash); });
47 47
48 _splashes.add(splash); 48 _splashes.add(splash);
(...skipping 22 matching lines...) Expand all
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/fixedheightscrollable.dart ('k') | sky/examples/stocks-fn/stocksapp.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698