replaceAt method

T replaceAt(
  1. int index,
  2. T value
)

Implementation

T replaceAt(int index, T value) {
  final T last = removeAt(index);
  insert(index, value);
  return last;
}