# invoke abstract method

dynamic invoke(

1. dynamic instance,
2. Map<String, dynamic> arguments

)

Invokes this method on the given `instance`.

- If the method is static, `instance` must be `null`.
- `arguments` must be a map where the keys match parameter names.

Throws if the invocation fails or the arguments are invalid.

### Example

    final result = method.invoke(myObject, {'param1': 42, 'param2': 'ok'});

## Implementation

    dynamic invoke(dynamic instance, Map<String, dynamic> arguments);