previousTitle property

ValueListenable<String?> previousTitle

True if an iOS-style back swipe pop gesture is currently underway for this route.

See also:

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

//bool get popGestureInProgress => isPopGestureInProgress(this);

/// 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:
///
///  * [ValueListenableBuilder], which can be used to listen and rebuild
///    widgets based on a ValueListenable.
ValueListenable<String?> get previousTitle {
  assert(
    _previousTitle != null,
    '''
Cannot read the previousTitle for a route that has not yet been installed''',
  );
  return _previousTitle!;
}