reset method

void reset({
  1. int? count,
  2. int? indexInOld,
  3. E? oldItem,
})

Reset with empty slots First slot is .delete

Implementation

void reset({int? count, int? indexInOld, E? oldItem}) {
  if (slots.isNotEmpty != true) {
    slots = <ListDiffs<E>>[];
    for (var x = 0; x < count!; x++) {
      /// Add old/new
      slots.add(ListDiffs.builder(args));
    }
  }

  slots[0] = combine(
    slot: slots[0],
    change: DeleteDiff<E>(args, indexInOld, 1),
  );
}