MobileScanner constructor

const MobileScanner({
  1. MobileScannerController? controller,
  2. MobileScannerErrorBuilder? errorBuilder,
  3. required void onDetect(
    1. BarcodeCapture barcodes
    ),
  4. required Widget cameraPreviewBuilder(
    1. BuildContext context,
    2. Widget texture,
    3. MobileScannerArguments arguments
    ),
  5. Rect? scanWindowBuilder(
    1. MobileScannerArguments
    )?,
  6. @Deprecated('Use onScannerStarted() instead.') void onStart(
    1. MobileScannerArguments? arguments
    )?,
  7. void onScannerStarted(
    1. MobileScannerArguments? arguments
    )?,
  8. Widget placeholderBuilder(
    1. BuildContext,
    2. Widget?
    )?,
  9. bool startDelay = false,
  10. Color borderColor = const Color(0xFF00BA88),
  11. double borderWidth = 10,
  12. Key? key,
})

Create a new MobileScanner using the provided controller and onBarcodeDetected callback.

Implementation

const MobileScanner({
  this.controller,
  this.errorBuilder,
  required this.onDetect,
  required this.cameraPreviewBuilder,
  this.scanWindowBuilder,
  @Deprecated('Use onScannerStarted() instead.') this.onStart,
  this.onScannerStarted,
  this.placeholderBuilder,
  this.startDelay = false,
  this.borderColor = const Color(0xFF00BA88),
  this.borderWidth = 10,
  super.key,
});