Function

getFocusedRect

Calculates the rectangular area in this node's coordinates that corresponds to the focus area of the focused node under this FocusTargetModifierNode, including itself.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

getFocusedRect

Common
fun FocusTargetModifierNode.getFocusedRect(): Rect?

Calculates the rectangular area in this node's coordinates that corresponds to the focus area of the focused node under this FocusTargetModifierNode, including itself.

This function returns null when;

  • This node is not focused and there is no focused descendant.
  • This node is detached from the composition hierarchy.