action method

bool action(
  1. Function action,
  2. C host, {
  3. Arguments? arguments,
})

Applies the validation rule to a specific action.

First checks if the host is unmodifiable and contains the action in its modifiable set. Then applies the rule's validation function if those checks pass.

Parameters:

  • action: The function to validate
  • host: The cell where the action will execute
  • arguments: The function call arguments

Implementation

bool action(Function action, C host, {Arguments? arguments}) {
  if (host is Unmodifiable && host.modifiable.contains(action)) {
    return false;
  }
  final Function func = _input is TypeObject<Function> ? _input.obj : _input();
  return func(action, host, arguments: arguments, user: _user);
}