close method

  1. @override
void close()
override

Signals to the group that the caller is done adding futures, and so future should fire once all added futures have completed.

Implementation

@override
void close() {
  _closed = true;
  if (_pending != 0) return;
  if (_completer.isCompleted) return;
  _completer.complete(_values.whereType<T>().toList());
}