apply method
dynamic
apply(])
override
Applies a function with controlled validation.
Parameters:
function
: The operation to performpositionalArguments
: Positional argsnamedArguments
: Named args
Returns:
Sync The result of the operation if validation passes
Async A Future
that resolves to the result of the operation
Implementation
@override
dynamic apply(Function function, List? positionalArguments, [Map<Symbol, dynamic>? namedArguments]) {
if (modifiable.contains(function)) {
if (!test.action(function, this, arguments: (positionalArguments: positionalArguments, namedArguments: namedArguments))) {
return;
}
}
return Function.apply(function, positionalArguments, namedArguments);
}