dispatch method
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:
- dispatchSync which dispatches sync actions, and throws if the action is async.
- dispatchAndWait which dispatches both sync and async actions, and returns a Future.
- dispatchAll which dispatches all given actions in parallel.
Implementation
FutureOr<ActionStatus> dispatch(ReduxAction<St> action, {bool notify = true}) =>
_dispatch(action, notify: notify);