didReplace method
The Navigator replaced oldRoute
with newRoute
.
Implementation
@override
void didReplace({Route<dynamic>? newRoute, Route<dynamic>? oldRoute}) {
final previous = oldRoute?.settings.name;
final current = newRoute?.settings.name;
if (newRoute is PageRoute) RouteManager.replace(current, previous);
}