ModalBottomSheetProperties

Class

Common
@ExperimentalMaterial3Api
expect class ModalBottomSheetProperties(shouldDismissOnBackPress: Boolean = true)

Properties used to customize the behavior of a ModalBottomSheet.

Parameters

shouldDismissOnBackPressWhether the modal bottom sheet can be dismissed by pressing the back button. If true, pressing the back button will call onDismissRequest.

Properties

Common
val shouldDismissOnBackPress: Boolean
Android
@ExperimentalMaterial3Api
actual class ModalBottomSheetProperties

Properties used to customize the behavior of a ModalBottomSheet.

Parameters

securePolicyPolicy for setting WindowManager.LayoutParams.FLAG_SECURE on the bottom sheet's window.
shouldDismissOnBackPressWhether the modal bottom sheet can be dismissed by pressing the back button. If true, pressing the back button will call onDismissRequest.

Secondary Constructors

constructor() {
    this.securePolicy = SecureFlagPolicy.Inherit
    this.shouldDismissOnBackPress = true
    this.isAppearanceLightStatusBars = null
    this.isAppearanceLightNavigationBars = null
}
constructor(
    securePolicy: SecureFlagPolicy = SecureFlagPolicy.Inherit,
    shouldDismissOnBackPress: Boolean = true,
) {
    this.securePolicy = securePolicy
    this.shouldDismissOnBackPress = shouldDismissOnBackPress
    this.isAppearanceLightNavigationBars = null
    this.isAppearanceLightStatusBars = null
}
constructor(
    isAppearanceLightStatusBars: Boolean,
    isAppearanceLightNavigationBars: Boolean,
    securePolicy: SecureFlagPolicy = SecureFlagPolicy.Inherit,
    shouldDismissOnBackPress: Boolean = true,
) {
    this.shouldDismissOnBackPress = shouldDismissOnBackPress
    this.securePolicy = securePolicy
    this.isAppearanceLightStatusBars = isAppearanceLightStatusBars
    this.isAppearanceLightNavigationBars = isAppearanceLightNavigationBars
}

Properties used to customize the behavior of a ModalBottomSheet.

Parameters

isAppearanceLightStatusBarsIf true, changes the foreground color of the status bars to light so that the items on the bar can be read clearly. If false, reverts to the default appearance.
isAppearanceLightNavigationBarsIf true, changes the foreground color of the navigation bars to light so that the items on the bar can be read clearly. If false, reverts to the default appearance.
securePolicyPolicy for setting WindowManager.LayoutParams.FLAG_SECURE on the bottom sheet's window.
shouldDismissOnBackPressWhether the modal bottom sheet can be dismissed by pressing the back button. If true, pressing the back button will call onDismissRequest.
actual constructor(shouldDismissOnBackPress: Boolean) {
    this.securePolicy = SecureFlagPolicy.Inherit
    this.shouldDismissOnBackPress = shouldDismissOnBackPress
    this.isAppearanceLightNavigationBars = null
    this.isAppearanceLightStatusBars = null
}
constructor(
    securePolicy: SecureFlagPolicy,
    isFocusable: Boolean,
    shouldDismissOnBackPress: Boolean,
) {
    this.securePolicy = securePolicy
    this.shouldDismissOnBackPress = shouldDismissOnBackPress
    this.isAppearanceLightNavigationBars = null
    this.isAppearanceLightStatusBars = null
}

Properties

Android
val securePolicy: SecureFlagPolicy
Android
actual val shouldDismissOnBackPress: Boolean