toNamedRemoveUntil<T extends Object?> method

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

Pushes a new named route onto the navigator and removes all the previous routes. Using (route) => false removes all routes below the new one.

Implementation

Future<T?> toNamedRemoveUntil<T extends Object?>(String routeName,
        {Object? arguments}) =>
    Navigator.of(this).pushNamedAndRemoveUntil<T>(routeName, (route) => false,
        arguments: arguments);