positionAt method

Dot positionAt(
  1. int index
)

The stable Dot of the live element at visible index.

A Dot is a durable position: it keeps identifying the same element across concurrent edits (and survives the element's own deletion as a tombstone), so an editor pins cursors / selections / comments to it rather than to an integer index.

Implementation

Dot positionAt(int index) {
  final vis = _visibleElems();
  RangeError.checkValidIndex(index, vis, 'index', vis.length);
  return vis[index].dot;
}