queryChild method

ChildQuery queryChild(
  1. int offset
)

Returns Line located at specified character offset.

Implementation

ChildQuery queryChild(int offset) {
  // TODO: prevent user from moving caret after last line-break.
  final res = _root.queryChild(offset, true);
  if (res.node is Line) {
    return res;
  }
  final block = res.node as Block;
  return block.queryChild(res.offset, true);
}