Commit 752e8677 authored by Hixie's avatar Hixie

Assert: don't push a PageRoute over a PopupRoute.

"Fixes" #389.
parent 630284bd
......@@ -350,6 +350,10 @@ abstract class ModalRoute<T> extends TransitionRoute<T> {
abstract class PopupRoute<T> extends ModalRoute<T> {
PopupRoute({ Completer<T> completer }) : super(completer: completer);
bool get opaque => false;
bool willPushNext(Route nextRoute) {
assert(nextRoute is! PageRoute);
return super.willPushNext(nextRoute);
}
}
/// A modal route that replaces the entire screen.
......
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