UniversalScannerView.builder constructor

const UniversalScannerView.builder({
  1. Key? key,
  2. required UniversalScannerBuilder? builder,
  3. ScannerController? controller,
  4. ScanMode initialMode = ScanMode.qr,
  5. List<ScanMode>? enabledModes,
  6. bool enableQr = true,
  7. bool enableBarcode = true,
  8. bool enablePdf417 = true,
  9. bool enablePassport = true,
  10. bool enableAadhaar = true,
  11. bool enablePan = true,
  12. bool enableDrivingLicense = true,
  13. bool enableVin = true,
  14. bool enableOcr = true,
  15. bool enableFace = true,
  16. bool enableDocument = true,
  17. bool enableInvoice = true,
  18. bool enableReceipt = true,
  19. bool enableBusinessCard = true,
  20. bool enableMultiCode = true,
  21. ScannerUiTheme? theme,
  22. Color? primaryAccentColor,
  23. Color? backgroundColor,
  24. Color? modeSelectorBackgroundColor,
  25. Color? overlayMaskColor,
  26. Color? laserBeamColor,
  27. bool? showModeBadge,
  28. bool? showGuideBox,
  29. bool? showLaserBeam,
  30. bool autoShowResultBottomSheet = true,
  31. dynamic onResultDetected(
    1. ScanResult result
    )?,
  32. Widget overlayBuilder(
    1. BuildContext context,
    2. ScannerController controller
    )?,
})

Constructs a UniversalScannerView using a custom builder to create a custom screen design.

Implementation

const UniversalScannerView.builder({
  super.key,
  required this.builder,
  this.controller,
  this.initialMode = ScanMode.qr,
  this.enabledModes,
  this.enableQr = true,
  this.enableBarcode = true,
  this.enablePdf417 = true,
  this.enablePassport = true,
  this.enableAadhaar = true,
  this.enablePan = true,
  this.enableDrivingLicense = true,
  this.enableVin = true,
  this.enableOcr = true,
  this.enableFace = true,
  this.enableDocument = true,
  this.enableInvoice = true,
  this.enableReceipt = true,
  this.enableBusinessCard = true,
  this.enableMultiCode = true,
  this.theme,
  this.primaryAccentColor,
  this.backgroundColor,
  this.modeSelectorBackgroundColor,
  this.overlayMaskColor,
  this.laserBeamColor,
  this.showModeBadge,
  this.showGuideBox,
  this.showLaserBeam,
  this.autoShowResultBottomSheet = true,
  this.onResultDetected,
  this.overlayBuilder,
});