withName static method
Returns a predicate that's true if the route has the specified name and if popping the route will not yield the same route, i.e. if the route's willHandlePopInternally property is false.
This function is typically used with Navigator.popUntil().
Implementation
static RoutePredicate withName(String name) {
return (Route<dynamic> route) {
return !route.willHandlePopInternally &&
route is TransModalRoute &&
route.settings.name == name;
};
}