Modal
fun Modal(isVisible: Boolean, modifier: Modifier = Modifier, onDismissRequest: () -> Unit? = null, dismissOnExternalClick: Boolean = true, dismissOnBackPress: Boolean = true, onPreviewKeyEvent: (KeyEvent) -> Boolean = { false }, onKeyEvent: (KeyEvent) -> Boolean = { false }, isFullScreen: Boolean = true, styles: ModalStyles = remember { ModalStyles() }, content: @Composable BoxScope.() -> Unit)
Creates a fully customizable Modal
Parameters
is Visible
Whether the modal is visible or not
on Dismiss Request
Executes when the user performs an action to dismiss the Modal
dismiss On External Click
calls onDismissRequest when clicking on the scrim
dismiss On Back Press
call onDismissRequest when pressing escape or back key
on Preview Key Event
Handles the onPreviewKey event
on Key Event
Handles the onKeyEvent
is Full Screen
Utilized in Android and iOS. Specifies whether to draw behind the system bars or not
styles
Styles to modify the look of the Modal
content
The content to be displayed inside the popup.