updateAtSorted method

void updateAtSorted(
  1. int index,
  2. E item
)

Updates an item in the list, maintaining the sort order

Implementation

void updateAtSorted(int index, E item) {
  if (_compare == null) {
    this[index] = item;
  } else {
    removeAt(index);
    addSorted(item);
  }
}