dispatch method
Dispatches the action, applying its reducer, and possibly changing the store state. The action may be sync or async.
store.dispatch(MyAction());
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
@override
FutureOr<ActionStatus> dispatch(
ReduxAction<St> action, {
bool notify = true,
}) {
ReduxAction<St>? _action = _getMockedAction(action);
return (_action == null) //
? Future.value(ActionStatus())
: super.dispatch(_action, notify: notify);
}