didReplace method
The Navigator replaced oldRoute
with newRoute
.
Implementation
@override
void didReplace({Route? newRoute, Route? oldRoute}) {
if (oldRoute != null && newRoute != null && routeHistory.contains(oldRoute)){
routeHistory[routeHistory.indexOf(oldRoute)] = newRoute;
}
super.didReplace(newRoute: newRoute, oldRoute: oldRoute);
report();
}