BackdropScaffoldState

Function

Common
fun BackdropScaffoldState(
    initialValue: BackdropValue,
    density: Density,
    animationSpec: AnimationSpec<Float> = BackdropScaffoldDefaults.AnimationSpec,
    confirmValueChange: (BackdropValue) -> Boolean = { true },
    snackbarHostState: SnackbarHostState = SnackbarHostState(),
) =
    BackdropScaffoldState(initialValue, animationSpec, confirmValueChange, snackbarHostState).also {
        it.density = density
    }

State of the persistent bottom sheet in BackdropScaffold.

Parameters

initialValueThe initial value of the state.
densityThe density that this state can use to convert values to and from dp.
animationSpecThe default animation that will be used to animate to a new state.
confirmValueChangeOptional callback invoked to confirm or veto a pending state change.
snackbarHostStateThe SnackbarHostState used to show snackbars inside the scaffold.