lightAnchor
public fun Modifier.lightAnchor(state: LightAnchorState): Modifier
Reports this composable's position to state, so that lights positioned with LightPosition.Anchored against the same state follow this composable.
Create state with remember and pass the same instance to this modifier and to every LightPosition.Anchored that should track it.
A given LightAnchorState tracks one composable at a time. If this modifier is applied to more than one composable simultaneously, the state reports whichever was placed most recently, which is rarely what was intended. When the anchored composable leaves the composition the state is cleared and the lights using it stop contributing.
Parameters
| state | the anchor to publish this composable's position to. |