Bag<E>.from constructor
Bag<E>.from (
- Iterable<
E> iterable
Creates a new Bag with the elements of iterable
.
Implementation
Bag.from(Iterable<E> iterable)
: _data = iterable.toList(growable: false),
_size = iterable.length;