animateLaserAlphaFloatAsState

Composable function that animates the alpha (opacity) of the laser path based on its state. The animation is triggered when the laser ends, and its opacity smoothly transitions from 1f to 0f.

Return

A state that represents the animated alpha value for the laser path.

Parameters

controller

The LaserPointerController responsible for controlling the laser pointer's state.

finishedListener

A callback function that is triggered when the laser reaches the end.