dispatchAndWaitAll<St> static method

Future<void> dispatchAndWaitAll<St>(
  1. BuildContext context,
  2. List<ReduxAction<St>> actions, {
  3. Object? debug,
  4. bool notify = true,
})

Dispatch a list of actions with ReduxAction.dispatchAndWaitAll without needing a StoreConnector. Example:

var status = await StoreProvider.dispatchAndWaitAll(context, [Action1(), Action2()]);

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

var status = await context.dispatchAndWaitAll([Action1(), Action2()])`.

Implementation

static Future<void> dispatchAndWaitAll<St>(
  BuildContext context,
  List<ReduxAction<St>> actions, {
  Object? debug,
  bool notify = true,
}) =>
    _getStoreNoDependency_Untyped(context, debug: debug)
        .dispatchAndWaitAll(actions, notify: notify);