getPositionForOffset abstract method

TextPosition getPositionForOffset(
  1. Offset offset
)

Returns the local coordinates of the endpoints of the given selection.

If the selection is collapsed (and therefore occupies a single point), the returned list is of length one. Otherwise, the selection is not collapsed and the returned list is of length two. In this case, however, the two points might actually be co-located (e.g., because of a bidirectional selection that contains some text but whose ends meet in the middle).

Implementation

TextPosition getPositionForOffset(Offset offset);