offset property

int get offset
inherited

Offset in characters of this node relative to parent node.

To get offset of this node in the document see documentOffset.

Implementation

int get offset {
  var offset = 0;

  if (list == null || isFirst) {
    return offset;
  }

  var cur = this;
  do {
    cur = cur.previous!;
    offset += cur.length;
  } while (!cur.isFirst);
  return offset;
}