rememberBottomSheetState

Functions summary

BottomSheetState
@Composable
rememberBottomSheetState(
    initialValue: BottomSheetValue,
    animationSpec: AnimationSpec<Float>,
    confirmStateChange: (BottomSheetValue) -> Boolean
)

Create a BottomSheetState and remember it.

Cmn

Functions

rememberBottomSheetState

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

Create a BottomSheetState and remember it.

Parameters
initialValue: BottomSheetValue

The initial value of the state.

animationSpec: AnimationSpec<Float> = BottomSheetScaffoldDefaults.AnimationSpec

The default animation that will be used to animate to a new state.

confirmStateChange: (BottomSheetValue) -> Boolean = { true }

Optional callback invoked to confirm or veto a pending state change.