DrawerState

class DrawerState


State of the NavigationDrawer or ModalNavigationDrawer composable.

Summary

Public companion properties

Saver<DrawerStateDrawerValue>

The Saver used by rememberDrawerState to record and restore DrawerState across activity or process recreation.

Public constructors

DrawerState(initialValue: DrawerValue)

Public functions

Unit
setValue(drawerValue: DrawerValue)

Updates the state of the drawer.

Public properties

DrawerValue

Public companion properties

Saver

Added in 1.0.0
val SaverSaver<DrawerStateDrawerValue>

The Saver used by rememberDrawerState to record and restore DrawerState across activity or process recreation.

Public constructors

DrawerState

Added in 1.0.0
DrawerState(initialValue: DrawerValue = DrawerValue.Closed)
Parameters
initialValue: DrawerValue = DrawerValue.Closed

the initial value (DrawerValue.Closed or DrawerValue.Open) of the drawer.

Public functions

setValue

Added in 1.0.0
fun setValue(drawerValue: DrawerValue): Unit

Updates the state of the drawer.

Parameters
drawerValue: DrawerValue

the value the state of the drawer should be set to.

Public properties

currentValue

Added in 1.0.0
val currentValueDrawerValue