resolveAllJoined<R> method

Future<R> resolveAllJoined<R>(
  1. FutureOr<R> joiner(
    1. List<T> l
    )
)

Resolves this Futures and join values with joiner.

Implementation

Future<R> resolveAllJoined<R>(FutureOr<R> Function(List<T> l) joiner) {
  if (isEmpty) {
    return Future.value(joiner(<T>[]));
  }

  return Future.wait(this).then(joiner);
}