BarcodeScanScreen
Displays a camera preview that detects barcodes and draws their bounds and values.
The caller must obtain the Android camera permission before adding this composable to the composition. Camera resources are released when it leaves the composition.
Parameters
Modifier applied to the camera screen.
Barcode formats to detect. All supported formats are enabled by default.
Whether the preview fits within or fills its available bounds.
Color used for barcode bounds and values.
Called with the barcodes detected in each analyzed frame. An empty list is reported when no barcode is detected.
Called when barcode detection fails for a camera frame.
Called when the barcode detector cannot be initialized.
Called when the camera is initialized and ready.
Called when the camera cannot be initialized.