call method
Validates an operation on the collective.
Parameters:
object
: The object being validated (either an element or action)cell
: The collective being operated onarguments
: Additional arguments for the operationexception
: Exception handler for validation failures
Returns true if the operation is allowed, false otherwise.
Implementation
@override
bool call(object, {covariant C? cell, arguments, bool Function(TestRule rule, Exception e) exception = TestRuleTrue.passed}) {
try {
if (cell != null && object is E && (arguments == null || arguments is Function)) {
return element(object, cell, action: arguments);
}
return super.call(object, cell: cell, arguments: arguments, exception: exception);
} on Exception catch(e) {
if (exception(this, e) == false) {
return false;
}
}
return true;
}