UniversalScannerView constructor

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

Constructs a new UniversalScannerView with default pre-packaged SDK layout.

Implementation

const UniversalScannerView({
  super.key,
  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,
}) : builder = null;