Commit cf3077ea authored by Hixie's avatar Hixie

Navigator.popUntil

This was already supported in the underlying classes but somehow not
exposed by Navigator itself.
parent 6a7f50c4
......@@ -137,6 +137,12 @@ class Navigator extends StatefulComponent {
});
return returnValue;
}
static void popUntil(BuildContext context, Route targetRoute) {
openTransaction(context, (NavigatorTransaction transaction) {
transaction.popUntil(targetRoute);
});
}
static bool canPop(BuildContext context) {
NavigatorState navigator = context.ancestorStateOfType(NavigatorState);
......
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