BarcodeScannerWidget constructor
const
BarcodeScannerWidget({
- Key? key,
- CameraSelector cameraSelector = CameraSelector.back,
- bool startScanning = true,
- bool stopScanOnBarcodeDetected = true,
- CameraOrientation orientation = CameraOrientation.portrait,
- ScannerType scannerType = ScannerType.barcode,
- dynamic onBarcodeDetected(
- Barcode barcode
- dynamic onTextDetected(
- String textResult
- dynamic onMrzDetected()?,
- dynamic onScanProgress(
- int? progress
- required dynamic onError(
- dynamic error
Implementation
const BarcodeScannerWidget(
{Key? key, this.cameraSelector = CameraSelector.back,
this.startScanning = true,
this.stopScanOnBarcodeDetected = true,
this.orientation = CameraOrientation.portrait,
this.scannerType = ScannerType.barcode,
this.onBarcodeDetected,
this.onTextDetected,
this.onMrzDetected,
this.onScanProgress,
required this.onError,
})
: assert(onBarcodeDetected != null || onTextDetected != null),
super(key: key);