apply static method

dynamic apply(
  1. Function function,
  2. List params, [
  3. Map<String, dynamic>? namedArgs
])

apply a closure function.

  • function - the closure function.
  • params - the positional + optional parameters.
  • namedArgs - the optional named arguments.

Implementation

static apply(Function function, List params,
    [Map<String, dynamic>? namedArgs])
  => applyByMirror(reflect(function) as ClosureMirror, params, namedArgs);