dispatchSync<St> static method
ActionStatus
dispatchSync<St>(
- BuildContext context,
- ReduxAction<
St> action, { - Object? debug,
- bool notify = true,
Dispatch an action with ReduxAction.dispatchSync
without needing a StoreConnector
. Example:
StoreProvider.dispatchSync(context, MyAction());
However, it's recommended that you use the built-in BuildContext
extension instead:
context.dispatchSync(action)`.
Implementation
static ActionStatus dispatchSync<St>(BuildContext context, ReduxAction<St> action,
{Object? debug, bool notify = true}) =>
_getStoreNoDependency_Untyped(context, debug: debug).dispatchSync(action, notify: notify);