Composable Component

OpenOnPhoneDialog

A full-screen dialog that displays an animated icon with a curved text at the bottom.

OpenOnPhoneDialogSample

@Composable
fun OpenOnPhoneDialogSample() {
    var showConfirmation by remember { mutableStateOf(false) }
    Box(Modifier.fillMaxSize()) {
        FilledTonalButton(
            modifier = Modifier.align(Alignment.Center),
            onClick = { showConfirmation = true },
            label = { Text("Open on phone") },
        )
    }
    val text = OpenOnPhoneDialogDefaults.text
    val style = OpenOnPhoneDialogDefaults.curvedTextStyle
    OpenOnPhoneDialog(
        visible = showConfirmation,
        onDismissRequest = { showConfirmation = false },
        curvedText = { openOnPhoneDialogCurvedText(text = text, style = style) },
    )
}