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

to construct the default implementation.

Properties

Link copied to clipboard

Whether the rail is currently expanded or not.

Link copied to clipboard
abstract val isAnimating: Boolean

Whether the state is currently animating

Link copied to clipboard

Whether the rail is going to be expanded or not.

Functions

Link copied to clipboard
abstract suspend fun collapse()

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

Link copied to clipboard
abstract suspend fun expand()

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

Link copied to clipboard
abstract suspend fun snapTo(targetValue: WideNavigationRailValue)

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

Link copied to clipboard
abstract suspend fun toggle()

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.