Index: sky/framework/components/scrollable.dart |
diff --git a/sky/framework/components/scrollable.dart b/sky/framework/components/scrollable.dart |
index 9164898843f776324f66a1e6bc55c54cb88f9029..9d4fc6a79dd64f0de19f97fa2bea30d50f2fa867 100644 |
--- a/sky/framework/components/scrollable.dart |
+++ b/sky/framework/components/scrollable.dart |
@@ -24,14 +24,21 @@ abstract class Scrollable extends Component { |
double _scrollOffset = 0.0; |
Simulation _simulation; |
- Scrollable({Object key, this.scrollBehavior}) : super(key: key) { |
- events.listen('pointerdown', _handlePointerDown); |
- events.listen('pointerup', _handlePointerUpOrCancel); |
- events.listen('pointercancel', _handlePointerUpOrCancel); |
- events.listen('gestureflingstart', _handleFlingStart); |
- events.listen('gestureflingcancel', _handleFlingCancel); |
- events.listen('gesturescrollupdate', _handleScrollUpdate); |
- events.listen('wheel', _handleWheel); |
+ Scrollable({Object key, this.scrollBehavior}) : super(key: key); |
+ |
+ Node buildContent(); |
+ |
+ Node build() { |
+ return new EventTarget( |
+ buildContent(), |
+ onPointerDown: _handlePointerDown, |
+ onPointerUp: _handlePointerUpOrCancel, |
+ onPointerCancel: _handlePointerUpOrCancel, |
+ onGestureFlingStart: _handleFlingStart, |
+ onGestureFlingCancel: _handleFlingCancel, |
+ onGestureScrollUpdate: _handleScrollUpdate, |
+ onWheel: _handleWheel |
+ ); |
} |
void didUnmount() { |