maybeOf static method
- BuildContext context
Returns the active MenuAcceleratorCallbackBinding in the given context, if any, and creates a dependency relationship that will rebuild the context when onInvoke changes.
If no MenuAcceleratorCallbackBinding is found, returns null.
See also:
- of, which is similar, but asserts if no MenuAcceleratorCallbackBinding is found.
Implementation
static MenuAcceleratorCallbackBinding? maybeOf(BuildContext context) {
return context.dependOnInheritedWidgetOfExactType<MenuAcceleratorCallbackBinding>();
}