MutableThreePaneScaffoldState


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

Summary

Public constructors

Cmn

Public functions

suspend Unit
animateTo(
    targetState: ThreePaneScaffoldValue,
    animationSpec: FiniteAnimationSpec<Float>?
)

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

Cmn
suspend Unit
seekTo(
    fraction: @FloatRange(from = 0.0, to = 1.0) Float,
    targetState: ThreePaneScaffoldValue
)

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

Cmn
suspend Unit

Sets currentState and targetState to targetState and snaps all values to those at that state.

Cmn

Public properties

open ThreePaneScaffoldValue

Current ThreePaneScaffoldValue state of the transition.

Cmn
open Float

The progress of the transition from currentState to targetState as a fraction of the entire duration.

Cmn
open ThreePaneScaffoldValue

Target ThreePaneScaffoldValue state of the transition.

Cmn

Public constructors

MutableThreePaneScaffoldState

MutableThreePaneScaffoldState(
    initialScaffoldValue: ThreePaneScaffoldValue
)

Public functions

animateTo

suspend fun animateTo(
    targetState: ThreePaneScaffoldValue = this.targetState,
    animationSpec: FiniteAnimationSpec<Float>? = null
): Unit

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

Parameters
targetState: ThreePaneScaffoldValue = this.targetState

The ThreePaneScaffoldValue state to animate towards.

animationSpec: FiniteAnimationSpec<Float>? = null

If provided, is used to animate the animation fraction. If null, the transition is linearly traversed based on the duration of the transition.

See also
animateTo

seekTo

suspend fun seekTo(
    fraction: @FloatRange(from = 0.0, to = 1.0) Float,
    targetState: ThreePaneScaffoldValue = this.targetState
): Unit

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

Parameters
fraction: @FloatRange(from = 0.0, to = 1.0) Float

The fractional progress of the transition.

targetState: ThreePaneScaffoldValue = this.targetState

The ThreePaneScaffoldValue state to seek to.

See also
seekTo

snapTo

suspend fun snapTo(targetState: ThreePaneScaffoldValue): Unit

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: ThreePaneScaffoldValue

The ThreePaneScaffoldValue state to snap to.

See also
snapTo

Public properties

currentState

open val currentStateThreePaneScaffoldValue

Current ThreePaneScaffoldValue state of the transition. If there is an active transition, currentState and targetState are different.

progressFraction

open val progressFractionFloat

The progress of the transition from currentState to targetState as a fraction of the entire duration.

If targetState and currentState are the same, progressFraction will be 0.

targetState

open val targetStateThreePaneScaffoldValue

Target ThreePaneScaffoldValue state of the transition. If this is the same as currentState, no transition is active.