BoolList.of constructor

BoolList.of(
  1. Iterable<bool> elements, {
  2. bool growable = false,
})

Creates a list containing all elements.

The Iterator of elements provides the order of the elements.

This constructor creates a growable BoolList when growable is true; otherwise, it returns a fixed-length list.

Implementation

factory BoolList.of(Iterable<bool> elements, {bool growable = false}) {
  return BoolList._selectType(elements.length, growable)..setAll(0, elements);
}