KmpPopup

actual fun KmpPopup(alignment: Alignment, offset: IntOffset, dismissOnBackPress: Boolean, onDismissRequest: () -> Unit?, focusable: Boolean, onPreviewKeyEvent: (KeyEvent) -> Boolean, onKeyEvent: (KeyEvent) -> Boolean, isFullScreen: Boolean, content: () -> Unit)
actual fun KmpPopup(popupPositionProvider: PopupPositionProvider, dismissOnBackPress: Boolean, onDismissRequest: () -> Unit?, onPreviewKeyEvent: (KeyEvent) -> Boolean, onKeyEvent: (KeyEvent) -> Boolean, focusable: Boolean, isFullScreen: Boolean, content: @Composable () -> Unit)
expect fun KmpPopup(alignment: Alignment = Alignment.Center, offset: IntOffset = IntOffset.Zero, dismissOnBackPress: Boolean = false, onDismissRequest: () -> Unit? = null, focusable: Boolean = false, onPreviewKeyEvent: (KeyEvent) -> Boolean = { false }, onKeyEvent: (KeyEvent) -> Boolean = { false }, isFullScreen: Boolean = true, content: @Composable () -> Unit)

Creates a customizable Popup with a given alignment

Parameters

alignment

The alignment relative to the parent.

dismissOnBackPress

Calls onDismissRequest when the back button or escape button is pressed. If this is set to true, all back handlers will be ignored.

offset

An offset from the original aligned position of the popup. Offset respects the Ltr/Rtl context, thus in Ltr it will be added to the original aligned position and in Rtl it will be subtracted from it.

onDismissRequest

Executes when the user clicks outside the popup.

focusable

Whether the popup is focusable. When true, the popup will receive IME events and key presses, such as when the back button is pressed.

onPreviewKeyEvent

Handles the onPreviewKey event

onKeyEvent

Handles the onKeyEvent. onKeyEvent allows consuming key events before reaching any BackHandlers.

isFullScreen

Utilized in Android and iOS. Specifies whether to draw behind the system bars or not. Setting isFullScreen to true will ignore alignment and offset parameters

content

The content to be displayed inside the popup.


expect fun KmpPopup(popupPositionProvider: PopupPositionProvider, dismissOnBackPress: Boolean = false, onDismissRequest: () -> Unit? = null, onPreviewKeyEvent: (KeyEvent) -> Boolean = { false }, onKeyEvent: (KeyEvent) -> Boolean = { false }, focusable: Boolean = false, isFullScreen: Boolean = true, content: @Composable () -> Unit)

Creates a customizable Popup with a given position

Parameters

popupPositionProvider

Calculates the position of a popup on screen.

dismissOnBackPress

Calls onDismissRequest when the back button or escape button is pressed. If this is set to true, all back handlers will be ignored.

onDismissRequest

Executes when the user clicks outside the popup.

focusable

Whether the popup is focusable. When true, the popup will receive IME events and key presses, such as when the back button is pressed.

onPreviewKeyEvent

Handles the onPreviewKey event

onKeyEvent

Handles the onKeyEvent

isFullScreen

Utilized in Android and iOS. Specifies whether to draw behind the system bars or not. Setting isFullScreen to true will ignore popupPositionProvider

content

The content to be displayed inside the popup.

actual fun KmpPopup(alignment: Alignment, offset: IntOffset, dismissOnBackPress: Boolean, onDismissRequest: () -> Unit?, focusable: Boolean, onPreviewKeyEvent: (KeyEvent) -> Boolean, onKeyEvent: (KeyEvent) -> Boolean, isFullScreen: Boolean, content: () -> Unit)
actual fun KmpPopup(popupPositionProvider: PopupPositionProvider, dismissOnBackPress: Boolean, onDismissRequest: () -> Unit?, onPreviewKeyEvent: (KeyEvent) -> Boolean, onKeyEvent: (KeyEvent) -> Boolean, focusable: Boolean, isFullScreen: Boolean, content: () -> Unit)
actual fun KmpPopup(alignment: Alignment, offset: IntOffset, dismissOnBackPress: Boolean, onDismissRequest: () -> Unit?, focusable: Boolean, onPreviewKeyEvent: (KeyEvent) -> Boolean, onKeyEvent: (KeyEvent) -> Boolean, isFullScreen: Boolean, content: () -> Unit)
actual fun KmpPopup(popupPositionProvider: PopupPositionProvider, dismissOnBackPress: Boolean, onDismissRequest: () -> Unit?, onPreviewKeyEvent: (KeyEvent) -> Boolean, onKeyEvent: (KeyEvent) -> Boolean, focusable: Boolean, isFullScreen: Boolean, content: () -> Unit)
actual fun KmpPopup(alignment: Alignment, offset: IntOffset, dismissOnBackPress: Boolean, onDismissRequest: () -> Unit?, focusable: Boolean, onPreviewKeyEvent: (KeyEvent) -> Boolean, onKeyEvent: (KeyEvent) -> Boolean, isFullScreen: Boolean, content: () -> Unit)
actual fun KmpPopup(popupPositionProvider: PopupPositionProvider, dismissOnBackPress: Boolean, onDismissRequest: () -> Unit?, onPreviewKeyEvent: (KeyEvent) -> Boolean, onKeyEvent: (KeyEvent) -> Boolean, focusable: Boolean, isFullScreen: Boolean, content: () -> Unit)