ModalBottomSheetProperties

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

Properties used to customize the behavior of a ModalBottomSheet.

Parameters

shouldDismissOnBackPress Whether the modal bottom sheet can be dismissed by pressing the back button. If true, pressing the back button will call onDismissRequest.
shouldDismissOnClickOutside Whether the modal bottom sheet can be dismissed by clicking on the scrim.

Properties

Common
val shouldDismissOnBackPress: Boolean
Common
val shouldDismissOnClickOutside: Boolean
Android
@ExperimentalMaterial3Api
actual class ModalBottomSheetProperties

Properties used to customize the behavior of a ModalBottomSheet.

Parameters

securePolicy Policy for setting WindowManager.LayoutParams.FLAG_SECURE on the bottom sheet's window.
shouldDismissOnBackPress Whether 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.shouldDismissOnClickOutside = true
    this.isAppearanceLightStatusBars = null
    this.isAppearanceLightNavigationBars = null
}

Properties used to customize the behavior of a ModalBottomSheet.

This constructor provides default behavior for ModalBottomSheet. See other constructors for customization options.

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

Properties used to customize the behavior of a ModalBottomSheet.

Parameters

securePolicy Policy for setting WindowManager.LayoutParams.FLAG_SECURE on the bottom sheet's window.
shouldDismissOnBackPress Whether the modal bottom sheet can be dismissed by pressing the back button. If true, pressing the back button will call onDismissRequest.
shouldDismissOnClickOutside Whether the modal bottom sheet can be dismissed by clicking on the scrim.
constructor(
    isAppearanceLightStatusBars: Boolean,
    isAppearanceLightNavigationBars: Boolean,
    securePolicy: SecureFlagPolicy = SecureFlagPolicy.Inherit,
    shouldDismissOnBackPress: Boolean = true,
    shouldDismissOnClickOutside: Boolean = true,
) {
    this.shouldDismissOnBackPress = shouldDismissOnBackPress
    this.shouldDismissOnClickOutside = shouldDismissOnClickOutside
    this.securePolicy = securePolicy
    this.isAppearanceLightStatusBars = isAppearanceLightStatusBars
    this.isAppearanceLightNavigationBars = isAppearanceLightNavigationBars
}

Properties used to customize the behavior of a ModalBottomSheet.

Use this constructor to customize the behavior of status and navigation bars on the ModalBottomSheet window.

Parameters

isAppearanceLightStatusBars If 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.
isAppearanceLightNavigationBars If 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.
securePolicy Policy for setting WindowManager.LayoutParams.FLAG_SECURE on the bottom sheet's window.
shouldDismissOnBackPress Whether the modal bottom sheet can be dismissed by pressing the back button. If true, pressing the back button will call onDismissRequest.
shouldDismissOnClickOutside Whether the modal bottom sheet can be dismissed by clicking on the scrim.

Properties

Android
val securePolicy: SecureFlagPolicy
Android
actual val shouldDismissOnBackPress: Boolean
Android
actual val shouldDismissOnClickOutside: Boolean