Fix gesture events in fn2

This CL makes gesture events work again in fn2.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1146923005
This commit is contained in:
Adam Barth 2015-06-03 16:06:15 -07:00
parent da5e6c9a97
commit 0ee0a0c53b
2 changed files with 7 additions and 2 deletions

View File

@ -38,12 +38,17 @@ class ContainerApp extends App {
), ),
])), ])),
]), ]),
onPointerDown: _handlePointerDown); onPointerDown: _handlePointerDown,
onGestureTap: _handleGestureTap);
} }
void _handlePointerDown(sky.PointerEvent event) { void _handlePointerDown(sky.PointerEvent event) {
print("_handlePointerDown"); print("_handlePointerDown");
} }
void _handleGestureTap(sky.GestureEvent event) {
print("_handleGestureTap");
}
} }
void main() { void main() {

View File

@ -28,7 +28,7 @@ class RenderSolidColor extends RenderDecoratedBox {
size = constraints.constrain(desiredSize); size = constraints.constrain(desiredSize);
} }
void handlePointer(sky.PointerEvent event) { void handleEvent(sky.Event event) {
if (event.type == 'pointerdown') if (event.type == 'pointerdown')
decoration = new BoxDecoration(backgroundColor: const sky.Color(0xFFFF0000)); decoration = new BoxDecoration(backgroundColor: const sky.Color(0xFFFF0000));
else if (event.type == 'pointerup') else if (event.type == 'pointerup')