getOffsetForCaret method

  1. @override
Offset getOffsetForCaret(
  1. TextPosition position
)
override

Returns the offset at which to paint the caret.

The position parameter must be relative to the node's content.

Valid only after layout.

Implementation

@override
Offset getOffsetForCaret(TextPosition position) {
  return _body!.getOffsetForCaret(position, _caretPrototype) + (_body!.parentData as BoxParentData).offset;
}