AlertDialog

@Composable
fun AlertDialog(heading: String, body: String, responses: List<AlertDialogResponse>, onResponse: (AlertDialogResponse) -> Unit, onClose: () -> Unit, modifier: Modifier = Modifier, contentHeight: Int = -1, contentWidth: Int = -1, followsContentSize: Boolean = false, presentationMode: DialogPresentationMode = DialogPresentationMode.AUTO, defaultResponse: AlertDialogResponse? = null)

Creates a org.gnome.adw.AlertDialog, a dialog presenting a message or a question.

Parameters

heading

The heading of the dialog.

body

The body text of the dialog.

responses

List of possible responses shown as buttons.

onResponse

Callback triggered when a response is selected.

onClose

Callback triggered when the dialog is closed.

modifier

Compose Modifier for layout and styling.

contentHeight

The height of the content.

contentWidth

The width of the content.

followsContentSize

Whether to size content automatically.

presentationMode

Which mode used to display the dialog.

defaultResponse

The response selected by default.