AiBarcodeScanner constructor

const AiBarcodeScanner({
  1. Key? key,
  2. BoxFit fit = BoxFit.cover,
  3. MobileScannerController? controller,
  4. Color? borderColor,
  5. double? cutOutWidth,
  6. double? cutOutHeight,
  7. double borderWidth = 12,
  8. Color overlayColor = const Color.fromRGBO(0, 0, 0, 82),
  9. double borderRadius = 24,
  10. double borderLength = 42,
  11. double cutOutSize = 352,
  12. double cutOutBottomOffset = 124,
  13. double scanWindowUpdateThreshold = 0.0,
  14. bool showOverlay = true,
  15. bool showError = true,
  16. bool showSuccess = true,
  17. Color errorColor = Colors.red,
  18. Color successColor = Colors.green,
  19. Widget errorBuilder(
    1. BuildContext,
    2. MobileScannerException,
    3. Widget?
    )?,
  20. Widget placeholderBuilder(
    1. BuildContext,
    2. Widget?
    )?,
  21. void onDispose()?,
  22. Rect? scanWindow,
  23. PreferredSizeWidget? appBar,
  24. LayoutWidgetBuilder? overlayBuilder,
  25. void onDetect(
    1. BarcodeCapture
    )?,
  26. bool validator(
    1. BarcodeCapture
    )?,
  27. void onImagePick(
    1. String?
    )?,
  28. String title = 'Scan any QR code',
  29. Widget child = const SizedBox.shrink(),
  30. bool hideDragHandler = false,
  31. bool hideTitle = false,
  32. AlignmentGeometry? buttonAlignment,
  33. List<Widget>? actions,
  34. void onPop()?,
})

Implementation

const AiBarcodeScanner({
  super.key,
  this.fit = BoxFit.cover,
  this.controller,
  this.borderColor,
  this.cutOutWidth,
  this.cutOutHeight,
  this.borderWidth = 12,
  this.overlayColor = const Color.fromRGBO(0, 0, 0, 82),
  this.borderRadius = 24,
  this.borderLength = 42,
  this.cutOutSize = 352,
  this.cutOutBottomOffset = 124,
  this.scanWindowUpdateThreshold = 0.0,
  this.showOverlay = true,
  this.showError = true,
  this.showSuccess = true,
  this.errorColor = Colors.red,
  this.successColor = Colors.green,
  this.errorBuilder,
  this.placeholderBuilder,
  this.onDispose,
  this.scanWindow,
  this.appBar,
  this.overlayBuilder,
  this.onDetect,
  this.validator,
  this.onImagePick,
  this.title = 'Scan any QR code',
  this.child = const SizedBox.shrink(),
  this.hideDragHandler = false,
  this.hideTitle = false,
  this.buttonAlignment,
  this.actions,
  this.onPop,
});