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

  1. @optionalTypeArgs
Future<T?> pushReplacement<T extends Object?, TO extends Object?>(
  1. Route<T> newRoute, {
  2. TO? result,
})

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

Implementation

@optionalTypeArgs
Future<T?> pushReplacement<T extends Object?, TO extends Object?>(
        Route<T> newRoute,
        {TO? result}) =>
    App.router.pushReplacement<T, TO>(newRoute, result: result);