dispatchAsyncTakeResult<R> method

  1. @internal
  2. @nonVirtual
Future<R> dispatchAsyncTakeResult<R>(
  1. BaseAsyncReduxActionWithResult<ReduxNotifier<ServerState>, ServerState, R> action, {
  2. String? debugOrigin,
  3. 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;
}