DisposableCollection<D extends Disposable>.from constructor

DisposableCollection<D extends Disposable>.from(Iterable<D> other, { bool autoClear })

Creates a DisposableCollection from list for Disposable instances.

Implementation

factory DisposableCollection.from(Iterable<D> other, {bool autoClear}) {
  checkNotNull(other, message: () => "other can't be null");
  return _DisposableList(other.toList(), autoClear ?? false);
}