delete method

Dot? delete(
  1. int i
)

Tombstone the live element at visible index i. Returns the start dot of the affected block, or null when i is out of range.

Implementation

Dot? delete(int i) {
  final vis = _visibleElems();
  if (i < 0 || i >= vis.length) return null;
  final e = vis[i];
  e.block.deleted.add(e.offset);
  vis.removeAt(i);
  return e.block.start;
}