action<I extends Intent> method

ComponentAction<I> action<I extends Intent>(
  1. ActionInvokeHandler<I> handler, {
  2. ComponentActionPredicate<I>? consumesKeyPredicate,
  3. ComponentActionPredicate<I>? isEnabledPredicate,
})

Implementation

ComponentAction<I> action<I extends Intent>(
  ActionInvokeHandler<I> handler, {
  ComponentActionPredicate<I>? consumesKeyPredicate,
  ComponentActionPredicate<I>? isEnabledPredicate,
}) {
  final _action = ComponentAction<I>(
    handler: handler,
    consumesKeyPredicate: consumesKeyPredicate,
    isEnabledPredicate: isEnabledPredicate,
  );
  _actions[_action.intentType] = _action;

  return _action;
}