Commit 5f5245dd authored by Ian Hickson's avatar Ian Hickson

Merge pull request #798 from Hixie/popUntil

Navigator.popUntil
parents 2305d019 cf3077ea
...@@ -138,6 +138,12 @@ class Navigator extends StatefulComponent { ...@@ -138,6 +138,12 @@ class Navigator extends StatefulComponent {
return returnValue; return returnValue;
} }
static void popUntil(BuildContext context, Route targetRoute) {
openTransaction(context, (NavigatorTransaction transaction) {
transaction.popUntil(targetRoute);
});
}
static bool canPop(BuildContext context) { static bool canPop(BuildContext context) {
NavigatorState navigator = context.ancestorStateOfType(NavigatorState); NavigatorState navigator = context.ancestorStateOfType(NavigatorState);
return navigator.canPop(); return navigator.canPop();
......
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