Google is committed to advancing racial equity for Black communities. See how.

ScaffoldState

@Stable class ScaffoldState
kotlin.Any
   ↳ androidx.ui.material.ScaffoldState

State for Scaffold composable component.

Contains basic screen state, e.g. Drawer configuration, as well as sizes of components after layout has happened

Summary

Public constructors
<init>(drawerState: DrawerState = DrawerState.Closed, isDrawerGesturesEnabled: Boolean = true)

State for Scaffold composable component.

Properties
Size?

Get current size of the bottomBar in Scaffold, if known.

DrawerState

drawer state position.

Size?

Get current size of the floatingActionButton in Scaffold, if known.

Boolean

Whether or not drawer sheet in scaffold (if set) can be interacted by gestures.

Size?

Get current size of the topBar in Scaffold, if known.

Public constructors

<init>

ScaffoldState(
    drawerState: DrawerState = DrawerState.Closed,
    isDrawerGesturesEnabled: Boolean = true)

State for Scaffold composable component.

Contains basic screen state, e.g. Drawer configuration, as well as sizes of components after layout has happened

Parameters
drawerState: DrawerState = DrawerState.Closed initial state of the Drawer in Scaffold.
isDrawerGesturesEnabled: Boolean = true whether or not drawer can be interacted with via gestures

Properties

bottomBarSize

val bottomBarSize: Size?

Get current size of the bottomBar in Scaffold, if known. null if this unknown or bottomBar parameter in scaffold is not set

drawerState

var drawerState: DrawerState

drawer state position. Change this value to programmatically open or close drawer sheet in Scaffold (if set).

floatingActionButtonSize

val floatingActionButtonSize: Size?

Get current size of the floatingActionButton in Scaffold, if known. null if this unknown or floatingActionButton parameter in scaffold is not set

isDrawerGesturesEnabled

var isDrawerGesturesEnabled: Boolean

Whether or not drawer sheet in scaffold (if set) can be interacted by gestures.

topBarSize

val topBarSize: Size?

Get current size of the topBar in Scaffold, if known. null if this unknown or topBar parameter in scaffold is not set