🌈 Create new beautiful Compose Gradients with our new wesite ->
Composable Function

rememberStandardBottomSheetState

Create and remember a SheetState for BottomSheetScaffold.

rememberStandardBottomSheetState

Source set: Common
@Deprecated(
    message = "Use rememberBottomSheetState with PartiallyExpanded initial value",
    replaceWith =
        ReplaceWith(
            "rememberBottomSheetState(initialValue = initialValue, " +
                "enabledValues = if (skipHiddenState) setOf(SheetValue.PartiallyExpanded, SheetValue.Expanded) " +
                "else setOf(SheetValue.Hidden, SheetValue.PartiallyExpanded, SheetValue.Expanded), " +
                "confirmValueChange = confirmValueChange)",
            "androidx.compose.material3.SheetValue",
        ),
)
@Composable
public fun rememberStandardBottomSheetState(
    initialValue: SheetValue = PartiallyExpanded,
    confirmValueChange: (SheetValue) -> Boolean = { true },
    skipHiddenState: Boolean = true,
): SheetState

Create and remember a SheetState for BottomSheetScaffold.

Parameters

initialValue the initial value of the state. Should be either PartiallyExpanded or Expanded if skipHiddenState is true
confirmValueChange optional callback invoked to confirm or veto a pending state change
skipHiddenState whether Hidden state is skipped for BottomSheetScaffold

Content updated: