mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge pull request #856 from Hixie/onPopRoute
Remove last traces of onEvent.
This commit is contained in:
commit
43d9766806
@ -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();
|
||||
}
|
||||
|
||||
@ -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<int, Touch> touches = <int, Touch>{};
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user