remember Bottom Sheet State
fun rememberBottomSheetState(initialDetent: SheetDetent, detents: List<SheetDetent> = listOf(SheetDetent.Hidden, SheetDetent.FullyExpanded), animationSpec: AnimationSpec<Float> = tween(), confirmDetentChange: (SheetDetent) -> Boolean = { true }, decayAnimationSpec: DecayAnimationSpec<Float> = rememberSplineBasedDecay(), velocityThreshold: () -> Dp = { 125.dp }, positionalThreshold: (totalDistance: Dp) -> Dp = { 56.dp }): BottomSheetState
Creates a BottomSheetState
Return
A remembered BottomSheetState instance.
Parameters
initial Detent
The initial detent of the sheet.
detents
The list of detents that the sheet can snap to.
animation Spec
The animation spec to use for animating between detents.
confirm Detent Change
Callback to confirm whether a detent change should be allowed.
decay Animation Spec
The animation spec to use for decay animations.
velocity Threshold
The velocity threshold for determining whether to snap to the next detent.
positional Threshold
The positional threshold for determining whether to snap to the next detent.