insortLeft method

void insortLeft(
  1. E item, {
  2. Comparator<E>? compare,
  3. int low = 0,
  4. int? high,
})

Assuming the list is sorted, insert item in list in sorted order.

Implementation

void insortLeft(E item, {Comparator<E>? compare, int low = 0, int? high}) {
  this.insert(
      this.bisectLeft(item, compare: compare, low: low, high: high), item);
}