| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |