ScanQrCodeDialog
fun ScanQrCodeDialog(title: @Composable () -> Unit? = null, text: @Composable () -> Unit? = null, additionalContent: @Composable () -> Unit? = null, dismissButton: String, onCodeScanned: (data: String) -> Boolean, onDismiss: () -> Unit, onNoCodeDetected: () -> Unit = {}, modifier: Modifier? = null)
Shows a dialog for scanning QR codes.
If the application doesn't have the necessary permission, the user is prompted to grant it.
Parameters
title
The title of the dialog.
text
The description to include in the dialog, displayed above the QR scanner window.
additionalContent
Content which is displayed below the QR scanner window.
dismissButton
The text for the dismiss button.
onCodeScanned
called when a QR code is scanned, the parameter is the parsed data. Should return true
to stop scanning, false
to continue scanning.
onDismiss
called when the dismiss button is pressed.
modifier
A Modifier or null
.