SortedList<E>.of constructor
SortedList<E>.of (
- Iterable<
E> iterable, { - Comparator<
E> ? comparator, - bool growable = true,
Constructs a sorted-list from an iterable with an optional ordering
.
Implementation
SortedList.of(Iterable<E> iterable,
{Comparator<E>? comparator, bool growable = true})
: _values = List<E>.of(iterable, growable: growable),
_comparator = comparator ?? naturalCompare {
_comparator.sort(_values);
}