invoke method

R invoke(
  1. Iterable<Object?>? positionalArguments, [
  2. Map<Symbol, Object?>? namedArguments
])

Invoke this method.

Implementation

R invoke(Iterable<Object?>? positionalArguments,
    [Map<Symbol, Object?>? namedArguments]) {
  try {
    return Function.apply(
        _function, positionalArguments?.toList(), namedArguments);
  } catch (_) {
    print('Error invoking:\n'
        '  - FunctionReflection: $this\n'
        '  - _function: $_function\n'
        '  - positionalArguments: $positionalArguments\n'
        '  - namedArguments: $namedArguments\n');
    rethrow;
  }
}