BuiltList<E>.of constructor

BuiltList<E>.of(
  1. Iterable<E> iterable
)

Instantiates with elements from an Iterable<E>.

E must not be dynamic.

Implementation

factory BuiltList.of(Iterable<E> iterable) {
  if (iterable is _BuiltList<E> && iterable.hasExactElementType(E)) {
    return iterable;
  } else {
    return _BuiltList<E>.of(iterable);
  }
}