didReplace method
The Navigator replaced oldRoute
with newRoute
.
Implementation
@override
void didReplace({Route<dynamic>? newRoute, Route<dynamic>? oldRoute}) {
screenNames.remove(newRoute?.settings.name);
setAndTaggingScreenName();
super.didReplace(newRoute: newRoute, oldRoute: oldRoute);
}