popRouteUntil method
Pops routes from the navigator stack until the predicate returns true.
The predicate parameter determines the condition for stopping the
removal of routes.
Implementation
void popRouteUntil(RoutePredicate predicate) {
Navigator.of(this).popUntil(predicate);
}