getOffsetForCaret method Null safety
- TextPosition position,
- Rect caretPrototype
Returns the offset at which to paint the caret.
Valid only after layout.
Implementation
Offset getOffsetForCaret(TextPosition position, Rect caretPrototype) {
assert(!debugNeedsLayout);
_layoutTextWithConstraints(constraints);
return _textPainter.getOffsetForCaret(position, caretPrototype);
}