-
-
Save DUMA042/e8fe96fcb1d486b230c04149fd3c9551 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If a QR/barcode has been detected, trigger the callback | |
if (qrCodeDetected) { | |
LaunchedEffect(Unit) { | |
// Delay for a short duration to allow recomposition | |
delay(100) // Adjust delay as needed | |
// Call the callback with the detected barcode value | |
onQrCodeDetected(barcode ?: "") | |
} | |
// Draw a rectangle around the detected barcode | |
DrawRectangle(rect = boundingRect) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment