getRectOfSemanticsNodeInViewCoordinates method

Rect? getRectOfSemanticsNodeInViewCoordinates(
  1. int viewId,
  2. int nodeId
)

Returns the global rect for the semantics node with the given nodeId in the view with the given viewId.

The rect is in the global coordinate space of the view's render tree, in logical pixels. This is useful for widgets that react to semantics actions and need the on-screen position of the semantics node that received the action.

Asserts in non-release builds and returns null if the view is unknown, the view has no semantics owner, or the node cannot be found. Callers should only invoke this in response to a semantics action, in which case all three lookups are expected to succeed.

Implementation

ui.Rect? getRectOfSemanticsNodeInViewCoordinates(int viewId, int nodeId) => null;