MobileScanner constructor

const MobileScanner({
  1. MobileScannerController? controller,
  2. void onDetect(
    1. BarcodeCapture barcodes
    )?,
  3. void onDetectError(
    1. Object error,
    2. StackTrace stackTrace
    ) = _onDetectErrorHandler,
  4. BoxFit fit = BoxFit.cover,
  5. MobileScannerErrorBuilder? errorBuilder,
  6. LayoutWidgetBuilder? overlayBuilder,
  7. Widget placeholderBuilder(
    1. BuildContext,
    2. Widget?
    )?,
  8. Rect? scanWindow,
  9. double scanWindowUpdateThreshold = 0.0,
  10. Key? key,
})

Create a new MobileScanner using the provided controller.

Implementation

const MobileScanner({
  this.controller,
  this.onDetect,
  this.onDetectError = _onDetectErrorHandler,
  this.fit = BoxFit.cover,
  this.errorBuilder,
  this.overlayBuilder,
  this.placeholderBuilder,
  this.scanWindow,
  this.scanWindowUpdateThreshold = 0.0,
  super.key,
});