didReplace method
Called after install when the route replaced another in the navigator.
The didChangeNext and didChangePrevious methods are typically called immediately after this method is called.
Implementation
@override
void didReplace(Route<dynamic>? oldRoute) {
super.didReplace(oldRoute);
if (oldRoute is RichbarRoute) {
_animationController!.value = oldRoute._animationController!.value;
}
_animation!.addStatusListener(_handleStatusChanged);
}