getLineBoundary method

TextRange getLineBoundary(
  1. TextPosition position
)

Returns the text range of the line at the given offset.

The newline (if any) is not returned as part of the range.

Implementation

TextRange getLineBoundary(TextPosition position) {
  assert(_debugAssertTextLayoutIsValid);
  return _layoutCache!.paragraph.getLineBoundary(position);
}