onInvoke method

void onInvoke(
  1. FutureOr<void> onInvoke(
    1. Invocation invocation
    )
)

sets the invocation handler, if an error is thrown within the handler this method will result an error message to the transport or router respectively

Implementation

void onInvoke(FutureOr<void> Function(Invocation invocation) onInvoke) {
  _onInvoke = onInvoke;
  _attachStreamInvocationHandlerIfNeeded();
}