getOffsetForCaret method Null safety
- TextPosition position,
- Rect caretPrototype
Returns the offset at which to paint the caret.
Valid only after layout has been called.
Implementation
Offset getOffsetForCaret(TextPosition position, Rect caretPrototype) {
_computeCaretMetrics(position, caretPrototype);
return _caretMetrics.offset;
}