rememberModalBottomSheetState

fun rememberModalBottomSheetState(initialValue: BottomSheetValue, animationSpec: AnimationSpec<Float> = DefaultAnimationSpec, confirmValueChange: (BottomSheetValue) -> Boolean = { true }, skipHalfExpanded: Boolean = false): BottomSheetState

Create and remember a ModalBottomSheetState.

Parameters

initialValue
  • The initial value of the state.

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

confirmValueChange
  • Optional callback invoked to confirm or veto a pending value change.

skipHalfExpanded
  • Should ModalBottomSheet expand at HalfExpanded value


fun rememberModalBottomSheetState(initialValue: BottomSheetValue, animationSpec: AnimationSpec<Float> = DefaultAnimationSpec, confirmValueChange: (BottomSheetValue) -> Boolean = { true }, halfExpandedSettings: HalfExpandedSettings): BottomSheetState

Create and remember a ModalBottomSheetState.

Parameters

initialValue
  • The initial value of the state.

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

confirmValueChange
  • Optional callback invoked to confirm or veto a pending value change.

halfExpandedSettings
  • How should ModalBottomSheet behave at HalfExpanded state.