pushReplacementNamed<T extends Object?, TO extends Object?> method

  1. @optionalTypeArgs
Future<T?> pushReplacementNamed<T extends Object?, TO extends Object?>(
  1. String routeName, {
  2. TO? result,
  3. Object? arguments,
})

Replace the current route of the navigator by pushing the route named routeName and then disposing the previous route once the new route has finished animating in.

Implementation

@optionalTypeArgs
Future<T?> pushReplacementNamed<T extends Object?, TO extends Object?>(
        String routeName,
        {TO? result,
        Object? arguments}) =>
    App.appState!.navigator!.pushReplacementNamed<T, TO>(routeName,
        result: result, arguments: arguments);