From 928c6290e095a3ff63948a0106c204aa85745d86 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Wed, 9 Dec 2015 21:07:06 -0800 Subject: [PATCH] Remove last traces of onEvent. --- examples/raw/hello_world.dart | 8 +++----- examples/rendering/interactive_flex.dart | 7 +++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/examples/raw/hello_world.dart b/examples/raw/hello_world.dart index c8de9d11b2f..b83297f194d 100644 --- a/examples/raw/hello_world.dart +++ b/examples/raw/hello_world.dart @@ -46,10 +46,8 @@ void beginFrame(Duration timeStamp) { ui.window.render(scene); } -void handleEvent(String eventType, double timeStamp) { - if (eventType == 'back') { - print('Pressed back button.'); - } +void handlePopRoute() { + print('Pressed back button.'); } void handlePointerPacket(ByteData serializedPacket) { @@ -73,7 +71,7 @@ void main() { print('Hello, world'); color = new ui.Color.fromARGB(255, 0, 255, 0); ui.window.onBeginFrame = beginFrame; - ui.window.onEvent = handleEvent; + ui.window.onPopRoute = handlePopRoute; ui.window.onPointerPacket = handlePointerPacket; ui.window.scheduleFrame(); } diff --git a/examples/rendering/interactive_flex.dart b/examples/rendering/interactive_flex.dart index 051f8b2dc4c..721ac7cd3ec 100644 --- a/examples/rendering/interactive_flex.dart +++ b/examples/rendering/interactive_flex.dart @@ -37,9 +37,8 @@ class RenderImageGrow extends RenderImage { RenderImageGrow image; -void handleEvent(String eventType, double timeStamp) { - if (eventType == "back") - activity.finishCurrentActivity(); +void handlePopRoute() { + activity.finishCurrentActivity(); } final Map touches = {}; @@ -116,6 +115,6 @@ Pancetta meatball tongue tenderloin rump tail jowl boudin."""; updateTaskDescription('Interactive Flex', topColor); new FlutterBinding(root: root); - ui.window.onEvent = handleEvent; + ui.window.onPopRoute = handlePopRoute; ui.window.onPointerPacket = handlePointerPacket; }