@ExperimentalWearFoundationApi
class RevealState


A class to keep track of the state of the composable. It can be used to customise the behaviour and state of the composable.

Summary

Public functions

suspend Unit
animateTo(targetValue: RevealValue)

Animates to the targetValue with the animation spec provided.

suspend Unit
snapTo(targetValue: RevealValue)

Snaps to the targetValue without any animation.

Public properties

RevealValue

The current RevealValue based on the status of the component.

Boolean

Returns whether the animation is running or not.

RevealActionType
Float

The current amount by which the revealable content has been revealed by.

Map<RevealValueFloat>

Defines the anchors for revealable content.

RevealValue

The target RevealValue based on the status of the component.

Public functions

animateTo

suspend fun animateTo(targetValue: RevealValue): Unit

Animates to the targetValue with the animation spec provided.

Parameters
targetValue: RevealValue

The target RevealValue where the currentValue will animate to.

snapTo

suspend fun snapTo(targetValue: RevealValue): Unit

Snaps to the targetValue without any animation.

Parameters
targetValue: RevealValue

The target RevealValue where the currentValue will be changed to.

See also
swipeableV2

Public properties

currentValue

Added in 1.2.0
val currentValueRevealValue

The current RevealValue based on the status of the component.

See also
swipeableV2

isAnimationRunning

Added in 1.2.0
val isAnimationRunningBoolean

Returns whether the animation is running or not.

See also
swipeableV2

lastActionType

Added in 1.4.0-alpha07
var lastActionTypeRevealActionType

offset

Added in 1.2.0
val offsetFloat

The current amount by which the revealable content has been revealed by.

See also
swipeableV2

swipeAnchors

Added in 1.2.0
val swipeAnchorsMap<RevealValueFloat>

Defines the anchors for revealable content. These anchors are used to determine the width at which the revealable content can be revealed to and stopped without requiring any input from the user.

See also
swipeableV2

targetValue

Added in 1.2.0
val targetValueRevealValue

The target RevealValue based on the status of the component. This will be equal to the currentValue if there is no animation running or swiping has stopped. Otherwise, this returns the next RevealValue based on the animation/swipe direction.

See also
swipeableV2