pushReplacement<T extends Object?> method

Future<T?> pushReplacement<T extends Object?>(
  1. String location, {
  2. Object? extra,
})

Replaces the top-most page of the page stack with the given URL location w/ optional query parameters, e.g. /family/f2/person/p1?color=blue.

See also:

  • go which navigates to the location.
  • push which pushes the given location onto the page stack.
  • replace which replaces the top-most page of the page stack but treats it as the same page. The page key will be reused. This will preserve the state and not run any page animation.

Implementation

Future<T?> pushReplacement<T extends Object?>(String location,
    {Object? extra}) {
  log('pushReplacement $location');
  return routeInformationProvider.pushReplacement<T>(
    location,
    base: routerDelegate.currentConfiguration,
    extra: extra,
  );
}