resolveAllMapped<R> method

Future<List<R>> resolveAllMapped<R>(
  1. R mapper(
    1. T e
    )
)

Resolves this Futures and maps with mapper.

Implementation

Future<List<R>> resolveAllMapped<R>(R Function(T e) mapper) {
  if (isEmpty) {
    return Future.value(<R>[]);
  }

  return Future.wait(this).then((l) {
    return l.map(mapper).toList();
  });
}