AiBarcodeScanner constructor
const
AiBarcodeScanner({
- Key? key,
- BoxFit fit = BoxFit.cover,
- MobileScannerController? controller,
- double scanWindowUpdateThreshold = 0.0,
- Widget overlayBuilder()?,
- Widget errorBuilder()?,
- void onDetectError()?,
- bool useAppLifecycleState = true,
- Widget placeholderBuilder()?,
- void onDispose()?,
- Rect? scanWindow,
- PreferredSizeWidget? appBarBuilder(
- BuildContext context,
- MobileScannerController controller
- void onDetect()?,
- bool validator()?,
- void onImagePick()?,
- GalleryButtonType galleryButtonType = GalleryButtonType.filled,
- Widget? bottomSheetBuilder(
- BuildContext context,
- MobileScannerController controller
- bool extendBodyBehindAppBar = true,
- AlignmentGeometry? galleryButtonAlignment,
- List<
Widget> ? actions, - bool setPortraitOrientation = true,
- ScannerOverlayConfig overlayConfig = const ScannerOverlayConfig(),
- String galleryButtonText = 'Upload from gallery',
- IconData galleryIcon = CupertinoIcons.photo,
- IconData cameraSwitchIcon = CupertinoIcons.arrow_2_circlepath,
- IconData flashOnIcon = CupertinoIcons.bolt_fill,
- IconData flashOffIcon = CupertinoIcons.bolt,
- bool returnImage = false,
- Future<
void> onCustomImagePicker(- bool validator()?,
- void onDetect()?,
- MobileScannerController controller
- Widget? child,
Implementation
const AiBarcodeScanner({
super.key,
this.fit = BoxFit.cover,
this.controller,
this.scanWindowUpdateThreshold = 0.0,
this.overlayBuilder,
this.errorBuilder,
this.onDetectError,
this.useAppLifecycleState = true,
this.placeholderBuilder,
this.onDispose,
this.scanWindow,
this.appBarBuilder,
this.onDetect,
this.validator,
this.onImagePick,
this.galleryButtonType = GalleryButtonType.filled,
this.bottomSheetBuilder,
this.bottomNavigationBarBuilder,
this.extendBodyBehindAppBar = true,
this.galleryButtonAlignment,
this.actions,
this.setPortraitOrientation = true,
this.overlayConfig = const ScannerOverlayConfig(),
this.galleryButtonText = 'Upload from gallery',
this.galleryIcon = CupertinoIcons.photo,
this.cameraSwitchIcon = CupertinoIcons.arrow_2_circlepath,
this.flashOnIcon = CupertinoIcons.bolt_fill,
this.flashOffIcon = CupertinoIcons.bolt,
this.returnImage = false,
this.onCustomImagePicker,
this.child,
});