ListChangeRecord<E>.replace constructor

ListChangeRecord<E>.replace(
  1. List<E> object,
  2. int index,
  3. List<E> removed, [
  4. int? addedCount,
])

Records a replace operation at object[index] of removed elements.

If addedCount is not specified it defaults to removed.length.

Implementation

ListChangeRecord.replace(this.object, this.index, List<E> removed,
    [int? addedCount])
    : removed = freezeInDevMode<E>(removed),
      addedCount = addedCount ?? removed.length {
  _assertValidState();
}