BarcodeScannerWidget constructor

const BarcodeScannerWidget({
  1. Key? key,
  2. CameraSelector cameraSelector = CameraSelector.back,
  3. bool startScanning = true,
  4. bool stopScanOnBarcodeDetected = true,
  5. CameraOrientation orientation = CameraOrientation.portrait,
  6. ScannerType scannerType = ScannerType.barcode,
  7. dynamic onBarcodeDetected(
    1. Barcode barcode
    )?,
  8. dynamic onTextDetected(
    1. String textResult
    )?,
  9. dynamic onMrzDetected(
    1. String mrz,
    2. Uint8List image
    )?,
  10. dynamic onScanProgress(
    1. int? progress
    )?,
  11. required dynamic onError(
    1. 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);