replaceRouteBelow<T extends Object> method

  1. @optionalTypeArgs
void replaceRouteBelow <T extends Object>(BuildContext context, { @required Route anchorRoute, Route<T> newRoute })

Replaces a route on the navigator that most tightly encloses the given context with a new route. The route to be replaced is the one below the given anchorRoute.

See also:

  • replace, which is the same but identifies the route to be removed directly.


static void replaceRouteBelow<T extends Object>(BuildContext context, { @required Route<dynamic> anchorRoute, Route<T> newRoute }) {
  return Navigator.of(context).replaceRouteBelow<T>(anchorRoute: anchorRoute, newRoute: newRoute);