previousTitle property

ValueListenable<String?> previousTitle

The title string of the previous CupertinoPageRoute.

The ValueListenable's value is readable after the route is installed onto a Navigator. The ValueListenable will also notify its listeners if the value changes (such as by replacing the previous route).

The ValueListenable itself will be null before the route is installed. Its content value will be null if the previous route has no title or is not a CupertinoPageRoute.

See also:

Implementation

ValueListenable<String?> get previousTitle {
  assert(
    _previousTitle != null,
    'Cannot read the previousTitle for a route that has not yet been installed',
  );
  return _previousTitle!;
}