didReplace method
The Navigator replaced oldRoute with newRoute.
Implementation
@override
void didReplace({Route? newRoute, Route? oldRoute}) {
if (oldRoute != null) MaskController.instance.forgetRoute(oldRoute);
unawaited(_pauseRecordingForNavigation());
if (newRoute != null) _attachTransitionListener(newRoute);
super.didReplace(newRoute: newRoute, oldRoute: oldRoute);
}