Commit 43d97668 authored by Ian Hickson's avatar Ian Hickson

Merge pull request #856 from Hixie/onPopRoute

Remove last traces of onEvent.
parents 5ddbc03b 928c6290
...@@ -46,10 +46,8 @@ void beginFrame(Duration timeStamp) { ...@@ -46,10 +46,8 @@ void beginFrame(Duration timeStamp) {
ui.window.render(scene); ui.window.render(scene);
} }
void handleEvent(String eventType, double timeStamp) { void handlePopRoute() {
if (eventType == 'back') {
print('Pressed back button.'); print('Pressed back button.');
}
} }
void handlePointerPacket(ByteData serializedPacket) { void handlePointerPacket(ByteData serializedPacket) {
...@@ -73,7 +71,7 @@ void main() { ...@@ -73,7 +71,7 @@ void main() {
print('Hello, world'); print('Hello, world');
color = new ui.Color.fromARGB(255, 0, 255, 0); color = new ui.Color.fromARGB(255, 0, 255, 0);
ui.window.onBeginFrame = beginFrame; ui.window.onBeginFrame = beginFrame;
ui.window.onEvent = handleEvent; ui.window.onPopRoute = handlePopRoute;
ui.window.onPointerPacket = handlePointerPacket; ui.window.onPointerPacket = handlePointerPacket;
ui.window.scheduleFrame(); ui.window.scheduleFrame();
} }
...@@ -37,8 +37,7 @@ class RenderImageGrow extends RenderImage { ...@@ -37,8 +37,7 @@ class RenderImageGrow extends RenderImage {
RenderImageGrow image; RenderImageGrow image;
void handleEvent(String eventType, double timeStamp) { void handlePopRoute() {
if (eventType == "back")
activity.finishCurrentActivity(); activity.finishCurrentActivity();
} }
...@@ -116,6 +115,6 @@ Pancetta meatball tongue tenderloin rump tail jowl boudin."""; ...@@ -116,6 +115,6 @@ Pancetta meatball tongue tenderloin rump tail jowl boudin.""";
updateTaskDescription('Interactive Flex', topColor); updateTaskDescription('Interactive Flex', topColor);
new FlutterBinding(root: root); new FlutterBinding(root: root);
ui.window.onEvent = handleEvent; ui.window.onPopRoute = handlePopRoute;
ui.window.onPointerPacket = handlePointerPacket; ui.window.onPointerPacket = handlePointerPacket;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment