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

Side by Side Diff: sky/examples/fn/widgets/fixedheightscrollable.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
« no previous file with comments | « no previous file | sky/examples/fn/widgets/material.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 FixedHeightScrollable extends Component { 3 abstract class FixedHeightScrollable extends Component {
4 4
5 static Style _style = new Style(''' 5 static Style _style = new Style('''
6 overflow: hidden; 6 overflow: hidden;
7 position: relative; 7 position: relative;
8 will-change: transform;''' 8 will-change: transform;'''
9 ); 9 );
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 _flingAnimationId = null; 99 _flingAnimationId = null;
100 } 100 }
101 101
102 void _updateFling(double timeStamp) { 102 void _updateFling(double timeStamp) {
103 double scrollDelta = _flingCurve.update(timeStamp); 103 double scrollDelta = _flingCurve.update(timeStamp);
104 if (!_scrollBy(scrollDelta)) 104 if (!_scrollBy(scrollDelta))
105 return _stopFling(); 105 return _stopFling();
106 _scheduleFlingUpdate(); 106 _scheduleFlingUpdate();
107 } 107 }
108 108
109 void _handleScrollUpdate(sky.Event event) { 109 void _handleScrollUpdate(sky.GestureEvent event) {
110 _scrollBy(-event.dy); 110 _scrollBy(-event.dy);
111 } 111 }
112 112
113 void _handleFlingStart(sky.Event event) { 113 void _handleFlingStart(sky.GestureEvent event) {
114 setState(() { 114 setState(() {
115 _flingCurve = new FlingCurve(-event.velocityY, event.timeStamp); 115 _flingCurve = new FlingCurve(-event.velocityY, event.timeStamp);
116 _scheduleFlingUpdate(); 116 _scheduleFlingUpdate();
117 }); 117 });
118 } 118 }
119 119
120 void _handleFlingCancel(sky.Event event) { 120 void _handleFlingCancel(sky.GestureEvent event) {
121 _stopFling(); 121 _stopFling();
122 } 122 }
123 123
124 void _handleWheel(sky.Event event) { 124 void _handleWheel(sky.WheelEvent event) {
125 _scrollBy(-event.offsetY); 125 _scrollBy(-event.offsetY);
126 } 126 }
127 } 127 }
OLDNEW
« no previous file with comments | « no previous file | sky/examples/fn/widgets/material.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698