invokeActionOnFocusedWidget function
Implementation
(bool enabled, Object? invokeResult) invokeActionOnFocusedWidget(
Intent intent) {
final context = primaryFocus?.context;
if (context != null) {
Action<Intent>? action = Actions.maybeFind<Intent>(context, intent: intent);
if (action != null) {
final (bool enabled, Object? invokeResult) =
Actions.of(context).invokeActionIfEnabled(action, intent);
return (enabled, invokeResult);
}
}
return (false, null);
}