dispatch<St> static method

FutureOr<ActionStatus> dispatch<St>(
  1. BuildContext context,
  2. ReduxAction<St> action, {
  3. Object? debug,
  4. bool notify = true,
})

Dispatch an action with ReduxAction.dispatch without needing a StoreConnector. Example:

StoreProvider.dispatch(context, MyAction());

However, it's recommended that you use the built-in BuildContext extension instead:

context.dispatch(action)`.

Implementation

static FutureOr<ActionStatus> dispatch<St>(BuildContext context, ReduxAction<St> action,
        {Object? debug, bool notify = true}) =>
    _getStoreNoDependency_Untyped(context, debug: debug).dispatch(action, notify: notify);