Composable Function

rememberScaffoldState

Creates a ScaffoldState with the default animation clock and memoizes it.

rememberScaffoldState

Source set: Common
@Composable
public fun rememberScaffoldState(
    drawerState: DrawerState = rememberDrawerState(DrawerValue.Closed),
    snackbarHostState: SnackbarHostState = remember { SnackbarHostState() },
): ScaffoldState

Creates a ScaffoldState with the default animation clock and memoizes it.

Parameters

drawerState the drawer state
snackbarHostState instance of SnackbarHostState to be used to show Snackbars inside of the Scaffold
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: