BarcodeScannerFrame

fun BarcodeScannerFrame(onClose: () -> Unit, showReticle: Boolean, errorMessage: String?, onRetry: () -> Unit, secondaryAction: ScannerAction? = null, camera: @Composable BoxScope.(windowModifier: Modifier) -> Unit)(source)

The full-screen scanner every platform shares: the camera behind a reticle, a close button, and an error card in place of the camera when it fails.

camera draws the camera view. It receives a modifier that places a view exactly inside the reticle's window, for a camera view that covers whatever Compose draws beneath it (a browser's <video> element); a camera view Compose can draw over fills the frame and ignores it.

Parameters

showReticle

whether to draw the reticle, normally once the camera shows a picture.

errorMessage

shown in an error card with Retry and Close; null while the camera works.

secondaryAction

offered at the bottom of the frame and in the error card.