didReplace method
The Navigator replaced oldRoute
with newRoute
.
Implementation
@override
void didReplace({Route? newRoute, Route? oldRoute}) {
super.didReplace(newRoute: newRoute, oldRoute: oldRoute);
_historyRoutes.remove(oldRoute);
if (newRoute != null) {
_historyRoutes.add(newRoute);
}
}