pushNamedAndRemoveUntil<T extends Object> method
Push the route with the given name onto the navigator, and then remove all
the previous routes until the predicate
returns true.
Implementation
Future<T?> pushNamedAndRemoveUntil<T extends Object>(
String routeName, {
Object? args,
bool Function(Route<dynamic>)? predicate,
}) async {
return navigationKey.currentState?.pushNamedAndRemoveUntil<T>(
routeName,
predicate ?? (_) => false,
arguments: args,
);
}