applyByMirror static method

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

apply a closure mirror.

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

Implementation

static applyByMirror(ClosureMirror function, List params,
    [Map<String, dynamic>? namedArgs])
  => function.apply(params, _toNamedParams(namedArgs) ?? const <Symbol, dynamic>{}).reflectee;