BottomSheetState

constructor(initialValue: BottomSheetValue, density: Density, animationSpec: AnimationSpec<Float> = DefaultAnimationSpec, isSkipHalfExpanded: Boolean = false, confirmValueChange: (BottomSheetValue) -> Boolean)

State of the persistent bottom sheet in ModalBottomSheet.

Parameters

initialValue
  • The initial value of the state.

density

The density that this state can use to convert values to and from dp.

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

isSkipHalfExpanded
  • Should ModalBottomSheet expand at HalfExpanded value

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


constructor(initialValue: BottomSheetValue, density: Density, animationSpec: AnimationSpec<Float> = DefaultAnimationSpec, halfExpandedSettings: HalfExpandedSettings = HalfExpandedSettings.Fraction(0.5f), confirmValueChange: (BottomSheetValue) -> Boolean)

Parameters

initialValue
  • The initial value of the state.

density

The density that this state can use to convert values to and from dp.

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

halfExpandedSettings
  • How should ModalBottomSheet behave at HalfExpanded state.

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