Replaces a route that is not currently visible with a new route.
The route to be removed is the one below the given anchorRoute
. That
route must not be the first route in the history.
In every other way, this acts the same as replace.
Source
void replaceRouteBelow({ Route<dynamic> anchorRoute, Route<dynamic> newRoute }) { assert(anchorRoute != null); assert(anchorRoute._navigator == this); assert(_history.indexOf(anchorRoute) > 0); replace(oldRoute: _history[_history.indexOf(anchorRoute)-1], newRoute: newRoute); }