getRectForPosition abstract method

Rect? getRectForPosition(
  1. DocumentPosition position
)

Returns the bounding box around the given position, within the associated component, or null if no corresponding component can be found, or the corresponding component has not yet been laid out.

For example, given a document layout that contains a text component that says "Hello, world", calling getRectForPosition() for the third character in that text component would return a bounding box for the character "l".

Implementation

Rect? getRectForPosition(DocumentPosition position);