WideNavigationRailState


A state object that can be hoisted to observe the wide navigation rail state. It allows for setting to the rail to be collapsed or expanded.

See also
rememberWideNavigationRailState

to construct the default implementation.

Summary

Public functions

suspend Unit

Collapse the rail with animation and suspend until it fully collapses.

Cmn
suspend Unit

Expand the rail with animation and suspend until it fully expands.

Cmn
suspend Unit

Set the state without any animation and suspend until it's set.

Cmn
suspend Unit

Collapse the rail with animation if it's expanded, or expand it if it's collapsed, and suspend until it's set to its new state.

Cmn

Public properties

WideNavigationRailValue

Whether the rail is currently expanded or not.

Cmn
Boolean

Whether the state is currently animating

Cmn
WideNavigationRailValue

Whether the rail is going to be expanded or not.

Cmn

Public functions

collapse

suspend fun collapse(): Unit

Collapse the rail with animation and suspend until it fully collapses.

expand

suspend fun expand(): Unit

Expand the rail with animation and suspend until it fully expands.

snapTo

suspend fun snapTo(targetValue: WideNavigationRailValue): Unit

Set the state without any animation and suspend until it's set.

Parameters
targetValue: WideNavigationRailValue

the expanded boolean to set to

toggle

suspend fun toggle(): Unit

Collapse the rail with animation if it's expanded, or expand it if it's collapsed, and suspend until it's set to its new state.

Public properties

currentValue

val currentValueWideNavigationRailValue

Whether the rail is currently expanded or not.

isAnimating

val isAnimatingBoolean

Whether the state is currently animating

targetValue

val targetValueWideNavigationRailValue

Whether the rail is going to be expanded or not.