getOffsetForCaret method
Implementation
@override
Offset getOffsetForCaret(TextPosition position, Rect? caretPrototype) {
assert(
position.offset == 1 || position.offset == 0 || position.offset == -1);
return position.offset <= 0
? Offset.zero
: Offset(
size.width - (caretPrototype == null ? 0 : caretPrototype.width),
0);
}