maybeOf static method
The state from the closest instance of this class that encloses the given context, if any.
Will return null if a HelperOrchestrator is not found in the given context.
See also:
- of, which is a similar function, except that it will throw an exception if a HelperOrchestrator is not found in the given context.
Implementation
static HelperOrchestratorState? maybeOf(BuildContext? context) {
if (context == null) {
return null;
}
final _HelperOrchestratorScope? scope =
context.dependOnInheritedWidgetOfExactType<_HelperOrchestratorScope>();
return scope?._helperOrchestratorState;
}