AiBarcodeScanner constructor
const
AiBarcodeScanner({
- Key? key,
- BoxFit fit = BoxFit.cover,
- MobileScannerController? controller,
- Color? borderColor,
- double? cutOutWidth,
- double? cutOutHeight,
- double borderWidth = 12,
- Color overlayColor = const Color.fromRGBO(0, 0, 0, 82),
- double borderRadius = 24,
- double borderLength = 42,
- double cutOutSize = 320,
- double cutOutBottomOffset = 110,
- double scanWindowUpdateThreshold = 0.0,
- Widget? customOverlayBuilder()?,
- bool showError = true,
- bool showSuccess = true,
- Color errorColor = Colors.red,
- Color successColor = Colors.green,
- Widget errorBuilder()?,
- Widget placeholderBuilder()?,
- void onDispose()?,
- Rect? scanWindow,
- PreferredSizeWidget? appBarBuilder(
- BuildContext context,
- MobileScannerController controller
- LayoutWidgetBuilder? overlayBuilder,
- void onDetect()?,
- bool validator()?,
- void onImagePick()?,
- String sheetTitle = 'Scan any QR code',
- Widget sheetChild = const SizedBox.shrink(),
- bool hideSheetDragHandler = false,
- bool hideSheetTitle = false,
- AlignmentGeometry? galleryButtonAlignment,
- List<
Widget> ? actions, - bool hideGalleryButton = false,
- bool hideGalleryIcon = true,
- Widget? bottomSheetBuilder(
- BuildContext context,
- MobileScannerController controller
- bool extendBodyBehindAppBar = true,
- 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,
});