put method

IList<T> put(
  1. int index,
  2. T value
)

This is the equivalent to void operator []=(int index, T value); Sets the value at the given index in the list to value or throws a RangeError if index is out of bounds.

Implementation

IList<T> put(int index, T value) {
  _count();
  // TODO: Still need to implement efficiently.
  var list = toList(growable: false);
  list[index] = value;
  return IList._unsafeFromList(list, config: config);
}