invokeAction method

  1. @override
Object? invokeAction(
  1. covariant Action<Intent> action,
  2. covariant Intent intent, [
  3. BuildContext? context
])
override

Invokes the given action, passing it the given intent.

The action will be invoked with the given context, if given, but only if the action is a ContextAction subclass. If no context is given, and the action is a ContextAction, then the context from the primaryFocus is used.

Returns the object returned from Action.invoke.

The caller must receive a true result from Action.isEnabled before calling this function (or ContextAction.isEnabled with the same context, if the action is a ContextAction). This function will assert if the action is not enabled when called.

Consider using invokeActionIfEnabled to invoke the action conditionally based on whether it is enabled or not, without having to check first.

Implementation

@override
Object? invokeAction(
  covariant Action<Intent> action,
  covariant Intent intent, [
  BuildContext? context,
]) {
  // customDebugPrint('Action invoked: $action($intent) from $context');
  super.invokeAction(action, intent, context);

  return null;
}