didReplace method

  1. @override
void didReplace({
  1. Route? newRoute,
  2. Route? oldRoute,
})
override

function for checking and handling routes Replace route behavior and stop playing audio.

Implementation

@override
void didReplace({Route<dynamic>? newRoute, Route<dynamic>? oldRoute}) {
  if (newRoute is PageRoute<dynamic>) {
    _handleRouteChanged(newRoute);
  }
}