Class

DrawerState

State of the NavigationDrawer or ModalNavigationDrawer composable.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Android
class DrawerState(initialValue: DrawerValue = DrawerValue.Closed)

State of the NavigationDrawer or ModalNavigationDrawer composable.

Parameters

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

Properties

Android
var currentValue

Functions

setValue

fun setValue(drawerValue: DrawerValue)

Updates the state of the drawer.

Parameters

drawerValue the 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.