dispatchAndWait<St> static method
Future<ActionStatus>
dispatchAndWait<St>(
- BuildContext context,
- ReduxAction<
St> action, { - Object? debug,
- 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);