pushReplacementRoute method

void pushReplacementRoute(
  1. String route
)

Removes the current route at the top of the stack and replaces it with the provided one.

Implementation

void pushReplacementRoute(String route) {
  setState(() {
    _routeHistory.removeLast();
    _routeHistory.add(route);
  });
  _notifyRouteChange();
}