dispatch property

Dispatch<St> dispatch

Dispatches the action, applying its reducer, and possibly changing the store state. The action may be sync or async.

store.dispatch(MyAction());

If you pass the notify parameter as false, widgets will not necessarily rebuild because of this action, even if it changes the state.

Method dispatch is of type Dispatch.

See also:

  • dispatchAll which dispatches all given actions in parallel.
  • dispatchSync which dispatches sync actions, and throws if the action is async.
  • dispatchAndWaitAll which dispatches all given actions, and returns a Future.
  • dispatchAndWait which dispatches both sync and async actions, and returns a Future.

Implementation

Dispatch<St> get dispatch => _store.dispatch;