maybeOf static method
- BuildContext context
The closest instance of this class that encloses the given context.
If there is no enclosing SelectableRegion or SelectionArea widget, then null is returned.
Calling this method will create a dependency on the closest
SelectableRegionSelectionStatusScope in the context
, if there is one.
Implementation
static ValueListenable<SelectableRegionSelectionStatus>? maybeOf(BuildContext context) {
return context
.dependOnInheritedWidgetOfExactType<SelectableRegionSelectionStatusScope>()
?.selectionStatusNotifier;
}