OneHandedGestureIndicatorState

class OneHandedGestureIndicatorState


A state object used to coordinate visual feedback between a oneHandedGesture modifier and a gesture indicator.

Developers should set isIndicatorActive to true within the onGestureAvailable callback provided by oneHandedGesture modifier to signal that an indication event has occurred. The associated indicator observes this value to initiate its animation. Once the indicator completes its animation sequence, it must set isIndicatorActive back to false.

Summary

Public properties

Boolean

Whether the gesture indicator associated with this state should be displayed.

Public constructors

OneHandedGestureIndicatorState

Added in 1.7.0-alpha06
@RememberInComposition
OneHandedGestureIndicatorState()

Public properties

isIndicatorActive

Added in 1.7.0-alpha06
var isIndicatorActiveBoolean

Whether the gesture indicator associated with this state should be displayed.

  • To show the indicator: Set this to true (typically within the onGestureAvailable callback provided by oneHandedGesture modifier).

  • To reset the indicator: Indicators observing this value must set it back to false once they are no longer active, such as when their animation sequence has finished.