hasScopedWillPopCallback property
@protected
True if one or more WillPopCallback callbacks exist.
This method is used to disable the horizontal swipe pop gesture supported by MaterialPageRoute for TargetPlatform.iOS. If a pop might be vetoed, then the back gesture is disabled.
The buildTransitions method will not be called again if this changes, since it can change during the build as descendants of the route add or remove callbacks.
See also:
- addScopedWillPopCallback, which adds a callback.
- removeScopedWillPopCallback, which removes a callback.
- willHandlePopInternally, which reports on another reason why a pop might be vetoed.
Implementation
@protected
bool get hasScopedWillPopCallback {
return _willPopCallbacks.isNotEmpty;
}