popUntilWithResult<T extends Object?> static method
- BuildContext context,
- RoutePredicate predicate,
- T? result
Calls pop repeatedly on the navigator that most tightly encloses the
given context until the predicate returns true, returning the result to
the last popped route.
The T type argument is the type of the return value of the last popped route.
The predicate may be applied to the same route more than once if Route.willHandlePopInternally is true.
To pop until a route with a certain name, use the RoutePredicate returned from ModalRoute.withName.
The routes are closed with null as their return value.
See pop for more details of the semantics of popping a route.
Implementation
@optionalTypeArgs
static void popUntilWithResult<T extends Object?>(
BuildContext context,
RoutePredicate predicate,
T? result,
) {
Navigator.of(context).popUntilWithResult<T>(predicate, result);
}