WindowSecurityDialog

fun WindowSecurityDialog(show: Boolean, onConfirm: (dontRemind: Boolean) -> Unit, onCancel: () -> Unit, modifier: Modifier = Modifier, title: String? = null, summary: String? = null, statement: String? = null, statementLinkText: String? = null, onLinkClick: () -> Unit? = null, checkboxText: String? = SecurityDialogDefaults.CheckboxText, initialChecked: Boolean = false, confirmText: String = SecurityDialogDefaults.ConfirmText, cancelText: String = SecurityDialogDefaults.CancelText, titleColor: Color = DialogDefaults.titleColor(), summaryColor: Color = DialogDefaults.summaryColor(), backgroundColor: Color = DialogDefaults.backgroundColor(), colors: SecurityDialogColors = SecurityDialogDefaults.securityDialogColors(), enableWindowDim: Boolean = true, onDismissFinished: () -> Unit? = null)

A security statement dialog rendered at window level without Scaffold, matching the COUI security alert dialog (COUISecurityAlertDialogBuilder): a regular dialog extended with a statement paragraph (with an optional tappable link), a "don't remind me again" checkbox row and a cancel / confirm button bar.

Parameters

show

Whether the WindowSecurityDialog is shown.

onConfirm

Invoked when the confirm button is clicked, with the current checkbox state.

onCancel

Invoked when the cancel button is clicked, the user taps outside, or presses the back button.

modifier

The modifier to be applied to the WindowSecurityDialog.

title

The title of the dialog.

summary

The summary (message) of the dialog.

statement

The statement paragraph shown below the summary. Hidden when null.

statementLinkText

The substring of statement rendered as a tappable link.

onLinkClick

Invoked when the statement link is clicked.

checkboxText

The label of the checkbox row. Hidden when null.

initialChecked

The initial checkbox state, re-applied each time the dialog is shown.

confirmText

The label of the confirm (positive) button.

cancelText

The label of the cancel (negative) button.

titleColor

The color of the title.

summaryColor

The color of the summary.

backgroundColor

The background color of the dialog.

colors

The SecurityDialogColors of the statement, link and checkbox texts.

enableWindowDim

Whether to enable window dimming when the dialog is shown.

onDismissFinished

The callback when the WindowSecurityDialog is completely dismissed.