dispatchAsyncTakeResult<R> method
- @internal
- @nonVirtual
- BaseAsyncReduxActionWithResult<
ReduxNotifier< action, {ServerState> , ServerState, R> - String? debugOrigin,
- LabeledReference? debugOriginRef,
inherited
Dispatches an asynchronous action and updates the state. Returns only the result of the action.
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<R> dispatchAsyncTakeResult<R>(
BaseAsyncReduxActionWithResult<ReduxNotifier<T>, T, R> action, {
String? debugOrigin,
LabeledReference? debugOriginRef,
}) async {
final (_, result) = await _dispatchAsyncWithResult<R>(
action,
debugOrigin: debugOrigin,
debugOriginRef: debugOriginRef,
);
return result;
}