resolveAllThen<R> method
Same as Future.wait(this).then.
- Note: it's not possible to implement
onErrorand have the same behavior at Future.then, sinceonErrorwill be called only ifthisis a Future, and not when it's aT.
Implementation
FutureOr<R> resolveAllThen<R>(FutureOr<R> Function(List<T> values) onValues) {
var all = resolveAll();
if (all is List<T>) {
return onValues(all);
} else {
return all.then(onValues);
}
}