dispatch method

  1. @internal
  2. @nonVirtual
ServerState dispatch(
  1. SynchronousReduxAction<ReduxNotifier<ServerState>, ServerState, dynamic> action, {
  2. String? debugOrigin,
  3. LabeledReference? debugOriginRef,
})
inherited

Dispatches an action and updates the state. Returns the new state.

For library consumers, use:

  • BaseReduxAction.external to dispatch external actions.
  • external to dispatch external actions inside the notifier.
  • redux to dispatch internal actions inside the notifier.

Implementation

@internal
@nonVirtual
T dispatch(
  SynchronousReduxAction<ReduxNotifier<T>, T, dynamic> action, {
  String? debugOrigin,
  LabeledReference? debugOriginRef,
}) {
  return _dispatchWithResult<dynamic>(
    action,
    debugOrigin: debugOrigin,
    debugOriginRef: debugOriginRef,
  ).$1;
}