pushAndRemoveAll<T extends Object?> method
Push the given route onto the navigator, and then remove all the previous routes.
Implementation
Future<T?> pushAndRemoveAll<T extends Object?>(Route<T> newRoute) =>
pushAndRemoveUntil(newRoute, (_) => false);