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. 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, required this.onError})
    : assert(onBarcodeDetected != null || onTextDetected != null),
      super(key: key);