BoolList.of constructor Null safety

  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.


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