of static method
- BuildContext context
Returns the ActionDispatcher associated with the Actions widget that most tightly encloses the given BuildContext.
Will return a newly created ActionDispatcher if no ambient Actions widget is found.
Implementation
static ActionDispatcher of(BuildContext context) {
final _ActionsScope? marker = context.dependOnInheritedWidgetOfExactType<_ActionsScope>();
return marker?.dispatcher ?? _findDispatcher(context);
}