getPositionForOffset method
Returns the position within the text for the given pixel offset.
The offset
parameter must be local to this box coordinate system.
Valid only after layout.
Implementation
@override
TextPosition getPositionForOffset(Offset offset) {
return _body!.getPositionForOffset(offset - (_body!.parentData as BoxParentData).offset);
}