DrawerState

Class

Android
class DrawerState(initialValue: DrawerValue = DrawerValue.Closed)

State of the NavigationDrawer or ModalNavigationDrawer composable.

Parameters

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

Properties

Android
var currentValue

Functions

fun setValue(drawerValue: DrawerValue)

Updates the state of the drawer.

Parameters

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

Companion Object

Properties

Android
val Saver =
        Saver<DrawerState, DrawerValue>(
            save = { it.currentValue },
            restore = { DrawerState(it) }
        )

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