WideNavigationRailState
-
Cmn
interface 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()Collapse the rail with animation and suspend until it fully collapses. |
Cmn
|
suspend Unit |
expand()Expand the rail with animation and suspend until it fully expands. |
Cmn
|
suspend Unit |
snapTo(targetValue: WideNavigationRailValue)Set the state without any animation and suspend until it's set. |
Cmn
|
suspend Unit |
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. |
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 |
Public properties
currentValue
val currentValue: WideNavigationRailValue
Whether the rail is currently expanded or not.
targetValue
val targetValue: WideNavigationRailValue
Whether the rail is going to be expanded or not.