rememberModalBottomSheetState

Functions summary

SheetState
@Composable
@ExperimentalMaterial3Api
rememberModalBottomSheetState(
    skipPartiallyExpanded: Boolean,
    confirmValueChange: (SheetValue) -> Boolean
)

Create and remember a SheetState for ModalBottomSheet.

Cmn

Functions

rememberModalBottomSheetState

@Composable
@ExperimentalMaterial3Api
fun rememberModalBottomSheetState(
    skipPartiallyExpanded: Boolean = false,
    confirmValueChange: (SheetValue) -> Boolean = { true }
): SheetState

Create and remember a SheetState for ModalBottomSheet.

Parameters
skipPartiallyExpanded: Boolean = false

Whether the partially expanded state, if the sheet is tall enough, should be skipped. If true, the sheet will always expand to the Expanded state and move to the Hidden state when hiding the sheet, either programmatically or by user interaction.

confirmValueChange: (SheetValue) -> Boolean = { true }

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