Start native apps faster with the Composables CLI ->
Class

ThreePaneScaffoldValue

The adapted value of ThreePaneScaffold.

Source set: Common
class ThreePaneScaffoldValue internal constructor(
    val primary: PaneAdaptedValue,
    val secondary: PaneAdaptedValue,
    val tertiary: PaneAdaptedValue,
    internal val currentDestination: ThreePaneScaffoldRole?,
) : PaneScaffoldValue<ThreePaneScaffoldRole>, PaneExpansionStateKeyProvider

The adapted value of ThreePaneScaffold. It contains each pane's adapted value. ThreePaneScaffold will use the adapted values to decide which panes should be displayed and how they should be displayed. With other input parameters of ThreePaneScaffold fixed, each possible instance of this class should represent a unique state of ThreePaneScaffold and developers can compare two ThreePaneScaffoldValue to decide if there is a layout structure change.

For a Material-opinionated layout, it's suggested to use calculateThreePaneScaffoldValue to calculate the current scaffold value.

Parameters

primary PaneAdaptedValue of the primary pane of ThreePaneScaffold
secondary PaneAdaptedValue of the secondary pane of ThreePaneScaffold
tertiary PaneAdaptedValue of the tertiary pane of ThreePaneScaffold

Properties

paneExpansionStateKey

Source set: Common
override val paneExpansionStateKey by lazy {
        if (expandedCount != 2) {
            PaneExpansionStateKey.Default
        } else {
            val expandedPanes = Array<ThreePaneScaffoldRole?>(2) { null }
            var count = 0
            forEach { role, value ->
                if (value == PaneAdaptedValue.Expanded) {
                    expandedPanes[count++] = role
                }
            }
            TwoPaneExpansionStateKeyImpl(expandedPanes[0]!!, expandedPanes[1]!!)
        }
    }

Functions

equals

Source set: Common
override fun equals(other: Any?): Boolean

hashCode

Source set: Common
override fun hashCode(): Int

toString

Source set: Common
override fun toString(): String

get

Source set: Common
override operator fun get(role: ThreePaneScaffoldRole): PaneAdaptedValue