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 = 320,
  12. double cutOutBottomOffset = 110,
  13. double scanWindowUpdateThreshold = 0.0,
  14. Widget? customOverlayBuilder(
    1. BuildContext,
    2. bool?,
    3. MobileScannerController
    )?,
  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? appBarBuilder(
    1. BuildContext context,
    2. MobileScannerController controller
    )?,
  24. LayoutWidgetBuilder? overlayBuilder,
  25. void onDetect(
    1. BarcodeCapture
    )?,
  26. bool validator(
    1. BarcodeCapture
    )?,
  27. void onImagePick(
    1. String?
    )?,
  28. String sheetTitle = 'Scan any QR code',
  29. Widget sheetChild = const SizedBox.shrink(),
  30. bool hideSheetDragHandler = false,
  31. bool hideSheetTitle = false,
  32. AlignmentGeometry? galleryButtonAlignment,
  33. List<Widget>? actions,
  34. bool hideGalleryButton = false,
  35. bool hideGalleryIcon = true,
  36. Widget? bottomSheetBuilder(
    1. BuildContext context,
    2. MobileScannerController controller
    )?,
  37. bool extendBodyBehindAppBar = true,
  38. bool setPortraitOrientation = true,
})

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 = 320,
  this.cutOutBottomOffset = 110,
  this.scanWindowUpdateThreshold = 0.0,
  this.customOverlayBuilder,
  this.showError = true,
  this.showSuccess = true,
  this.errorColor = Colors.red,
  this.successColor = Colors.green,
  this.errorBuilder,
  this.placeholderBuilder,
  this.onDispose,
  this.scanWindow,
  this.appBarBuilder,
  this.overlayBuilder,
  this.onDetect,
  this.validator,
  this.onImagePick,
  this.sheetTitle = 'Scan any QR code',
  this.sheetChild = const SizedBox.shrink(),
  this.hideSheetDragHandler = false,
  this.hideSheetTitle = false,
  this.galleryButtonAlignment,
  this.actions,
  this.hideGalleryButton = false,
  this.hideGalleryIcon = true,
  this.bottomSheetBuilder,
  this.extendBodyBehindAppBar = true,
  this.setPortraitOrientation = true,
});