getPositionForPoint method

TextPosition getPositionForPoint(
  1. Offset globalPosition
)

Returns the position in the text for the given global coordinate.

See also:

Implementation

TextPosition getPositionForPoint(Offset globalPosition) {
  _computeTextMetricsIfNeeded();
  return _textPainter.getPositionForOffset(globalToLocal(globalPosition) - _paintOffset);
}