replace method

void replace(
  1. dynamic model,
  2. int index
)

? Set Value At index

Implementation

void replace(model, int index) {
  if (index < length) {
    insert(index, model);
    removeAt(indexOf(model) + 1);
  } else {
    throw Exception('Index Out Of Boundaries');
  }
}