rememberBottomSheetState

Composable Function

Common
@Composable
fun rememberBottomSheetState(
    initialValue: BottomSheetValue,
    animationSpec: AnimationSpec<Float> = BottomSheetScaffoldDefaults.AnimationSpec,
    confirmStateChange: (BottomSheetValue) -> Boolean = { true },
): BottomSheetState

Create a BottomSheetState and remember it.

Parameters

initialValueThe initial value of the state.
animationSpecThe default animation that will be used to animate to a new state.
confirmStateChangeOptional callback invoked to confirm or veto a pending state change.