DisposableCollection<D extends Disposable>.from constructor

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

Creates a DisposableCollection from list for Disposable instances.

Implementation

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