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:
- dispatchSync which dispatches sync actions, and throws if the action is async.
- dispatchAndWait which dispatches both sync and async actions, and returns a Future.
Implementation
Dispatch<St> get dispatch => _store.dispatch;