didChangePrevious method

  1. @override
void didChangePrevious (
  1. Route previousRoute

This route's previous route has changed to the given new route. This is called on a route whenever the previous route changes for any reason, so long as it is in the history. previousRoute will be null if there's no previous route.


void didChangePrevious(Route<dynamic> previousRoute) {
  final String previousTitleString = previousRoute is CupertinoPageRoute
      ? previousRoute.title
      : null;
  if (_previousTitle == null) {
    _previousTitle = ValueNotifier<String>(previousTitleString);
  } else {
    _previousTitle.value = previousTitleString;