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
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: