replace method

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

The replace method is the equivalent of operator []= for the IList.

Implementation

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