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

Boolean

Whether the state is currently animating

Cmn
Boolean

Whether the rail is expanded.

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 WideNavigationRailValue 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

isAnimating

val isAnimatingBoolean

Whether the state is currently animating

isExpanded

val isExpandedBoolean

Whether the rail is expanded.