pushNamedAndRemoveAll<T extends Object?> method

Future<T?> pushNamedAndRemoveAll<T extends Object?>(
  1. String newRouteName,
  2. {Object? arguments}
)

Push the route with the given name onto the navigator, and then remove all the previous routes.

Implementation

Future<T?> pushNamedAndRemoveAll<T extends Object?>(
  String newRouteName, {
  Object? arguments,
}) =>
    pushNamedAndRemoveUntil(newRouteName, (_) => false, arguments: arguments);