SortedList<E> constructor

SortedList<E>({
  1. Comparator<E>? comparator,
  2. bool growable = true,
})

Constructs an empty sorted-list with an optional ordering.

Implementation

SortedList({Comparator<E>? comparator, bool growable = true})
    : _values = List.empty(growable: growable),
      _comparator = comparator ?? naturalCompare;