dispatchAsync method
- @internal
- @nonVirtual
- AsynchronousReduxAction<
ReduxNotifier< action, {SettingsState> , SettingsState, dynamic> - String? debugOrigin,
- LabeledReference? debugOriginRef,
inherited
Dispatches an asynchronous action and updates the state. Returns the new state.
For library consumers, use:
BaseReduxAction.external
to dispatch external actions.external
to dispatch external actions inside the notifier.redux
to dispatch internal actions inside the notifier.
Implementation
@internal
@nonVirtual
Future<T> dispatchAsync(
AsynchronousReduxAction<ReduxNotifier<T>, T, dynamic> action, {
String? debugOrigin,
LabeledReference? debugOriginRef,
}) async {
final (state, _) = await _dispatchAsyncWithResult<dynamic>(
action,
debugOrigin: debugOrigin,
debugOriginRef: debugOriginRef,
);
return state;
}