Start native apps faster with the Composables CLI ->
Class

MutableThreePaneScaffoldState

The seekable state of a three pane scaffold.

Source set: Common
class MutableThreePaneScaffoldState(initialScaffoldValue: ThreePaneScaffoldValue) :
    ThreePaneScaffoldState()

The seekable state of a three pane scaffold. It serves as the SeekableTransitionState to manipulate the Transition between ThreePaneScaffoldValues.

Properties

currentState

Source set: Common
override val currentState

targetState

Source set: Common
override val targetState

progressFraction

Source set: Common
override val progressFraction

isPredictiveBackInProgress

Source set: Common
override var isPredictiveBackInProgress by mutableStateOf(false)

Functions

snapTo

Source set: Common
suspend fun snapTo(targetState: ThreePaneScaffoldValue)

Sets currentState and targetState to targetState and snaps all values to those at that state. The transition will not have any animations running after running snapTo.

Parameters

targetState The ThreePaneScaffoldValue state to snap to.

seekTo

Source set: Common
suspend fun seekTo(
        @FloatRange(from = 0.0, to = 1.0) fraction: Float,
        targetState: ThreePaneScaffoldValue = this.targetState,
        isPredictiveBackInProgress: Boolean = false,
    )

Seeks the transition to targetState with fraction used to indicate the progress towards targetState.

Parameters

fraction The fractional progress of the transition.
targetState The ThreePaneScaffoldValue state to seek to.
isPredictiveBackInProgress whether this seek is associated with a predictive back gesture on the scaffold.

animateTo

Source set: Common
suspend fun animateTo(
        targetState: ThreePaneScaffoldValue = this.targetState,
        animationSpec: FiniteAnimationSpec<Float>? = null,
        isPredictiveBackInProgress: Boolean = false,
    )

Updates the current targetState to targetState with an animation to the new state.

Parameters

targetState The ThreePaneScaffoldValue state to animate towards.
animationSpec If provided, is used to animate the animation fraction. If null, the transition is linearly traversed based on the duration of the transition.
isPredictiveBackInProgress whether this animation is associated with a predictive back gesture on the scaffold.