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. Widget errorBuilder(
    1. BuildContext,
    2. MobileScannerException
    )?,
  6. LayoutWidgetBuilder? overlayBuilder,
  7. WidgetBuilder? placeholderBuilder,
  8. Rect? scanWindow,
  9. double scanWindowUpdateThreshold = 0.0,
  10. bool useAppLifecycleState = true,
  11. bool tapToFocus = false,
  12. 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,
  this.useAppLifecycleState = true,
  this.tapToFocus = false,
  super.key,
});