1. override
void didChangeNext(Route nextRoute)

This route's next route has changed to the given new route. This is called on a route whenever the next route changes for any reason, except for cases when didPopNext() would be called, so long as it is in the history. nextRoute will be null if there's no next route.

Source

@override
void didChangeNext(Route<dynamic> nextRoute) {
  assert(nextRoute is! PageRoute<dynamic>);
  super.didChangeNext(nextRoute);
}