SuccessConfirmationDialog
Composable Component
Shows a SuccessConfirmationDialog
dialog with a success icon and optional short curved text.
This variation of confirmation dialog indicates a successful operation or action.
Android
@Composable
public fun SuccessConfirmationDialog(
visible: Boolean,
onDismissRequest: () -> Unit,
curvedText: (CurvedScope.() -> Unit)?,
modifier: Modifier = Modifier,
colors: ConfirmationDialogColors = ConfirmationDialogDefaults.successColors(),
properties: DialogProperties = DialogProperties(),
durationMillis: Long = ConfirmationDialogDefaults.DurationMillis,
content: @Composable () -> Unit = { ConfirmationDialogDefaults.SuccessIcon() },
)
Parameters
visible | A boolean indicating whether the confirmation dialog should be displayed. |
onDismissRequest | A lambda function to be called when the dialog is dismissed - either by swiping right or when the durationMillis has passed. Implementation of this lambda must remove the dialog from the composition hierarchy e.g. by setting visible to false. |
curvedText | A slot for displaying curved text content which will be shown along the bottom edge of the dialog. We recommend using confirmationDialogCurvedText for this parameter, which will give the default sweep angle and padding, and ConfirmationDialogDefaults.curvedTextStyle as the style. |
modifier | Modifier to be applied to the confirmation content. |
colors | A ConfirmationDialogColors object for customizing the colors used in this SuccessConfirmationDialog . |
properties | An optional DialogProperties object for configuring the dialog's behavior. |
durationMillis | The duration in milliseconds for which the dialog is displayed. This value will be adjusted by the accessibility manager according to the content displayed. |
content | A slot for displaying an icon inside the confirmation dialog, which can be animated. Defaults to an animated ConfirmationDialogDefaults.SuccessIcon . |