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