asFutures property

List<Future<T>> get asFutures

Returns all FutureOr elements as Future.

Implementation

List<Future<T>> get asFutures {
  if (this is List<Future<T>>) return this as List<Future<T>>;
  if (this is Iterable<Future<T>>) return cast<Future<T>>().toList();
  return map((e) => e is Future ? e as Future<T> : Future<T>.value(e))
      .toList();
}