Index: sky/sdk/lib/widgets/widget.dart |
diff --git a/sky/sdk/lib/widgets/widget.dart b/sky/sdk/lib/widgets/widget.dart |
index 7d450c98b11bdc330f7d7a1c48fb41004364fb4f..fcf6ebbceec18cfd02d9e82638ae873f67e9cc26 100644 |
--- a/sky/sdk/lib/widgets/widget.dart |
+++ b/sky/sdk/lib/widgets/widget.dart |
@@ -799,10 +799,17 @@ abstract class App extends AbstractWidgetRoot { |
if (root.parent == null) { |
// we haven't attached it yet |
WidgetAppView._appView.root = root; |
+ WidgetAppView._appView.eventListeners.add((event) { |
Hixie
2015/06/17 19:29:43
This shouldn't use the underbar version. If there'
|
+ if (event.type == "back") |
+ onBack(); |
+ }); |
} |
assert(root.parent is RenderView); |
} |
+ // Override this to handle back button behavior in your app |
+ void onBack() { } |
+ |
} |
typedef Widget Builder(); |