computeAll method
FutureOr<Map<ComputeIDs<D> , V> >
computeAll({
- bool throwError = true,
- FutureOr<
V> onError(- Object error,
- StackTrace stackTrace
- V? onErrorValue,
Resolves all computations and returns a map with the same keys.
If throwError is true, the first error is propagated.
Otherwise, onError or onErrorValue is used to produce a fallback value.
The result may be returned synchronously or asynchronously.
Implementation
FutureOr<Map<ComputeIDs<D>, V>> computeAll(
{bool throwError = true,
FutureOr<V> Function(Object error, StackTrace stackTrace)? onError,
V? onErrorValue}) =>
Map.fromEntries(
entries.map(
(e) => MapEntry(
e.key,
e.value.resolve(
throwError: throwError,
onError: onError,
onErrorValue: onErrorValue)),
),
).resolveAllValues();