dispatchAndWait<St> static method

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

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

var status = await StoreProvider.dispatchAndWait(context, MyAction());

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

var status = await context.dispatchAndWait(action)`.

Implementation

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