ScanResult constructor

ScanResult({
  1. required ScanMode mode,
  2. required String rawValue,
  3. Map<String, String>? fields,
  4. bool isValid = true,
  5. double confidence = 1.0,
  6. DateTime? timestamp,
  7. String? imagePath,
  8. Uint8List? rawBytes,
  9. String? format,
  10. String? documentCategory,
  11. Rect? roi,
  12. List<String>? enhancementsApplied,
  13. bool isDuplicate = false,
  14. List<Offset>? corners,
  15. Rect? boundingBox,
  16. Size? imageSize,
  17. Duration? scanDuration,
  18. Map<String, dynamic>? metadata,
  19. List<ScanResult>? multiResults,
  20. DocumentQualityScore? qualityScore,
  21. double? consensusConfidence,
  22. Map<String, bool>? verifications,
  23. Map<String, dynamic>? preprocessingInfo,
  24. BankChequeInfo? bankChequeInfo,
  25. List<BarcodeResult>? detectedBarcodes,
  26. String? sessionId,
  27. String? exportFormat,
  28. String? encryptionStatus,
  29. bool watermarkApplied = false,
  30. OcrTextResult? ocrTextResult,
  31. List<String>? processingPipeline,
  32. List<ScanResult>? alternativeResults,
  33. String? detectorName,
  34. List<String>? postProcessingCorrections,
})

Creates a new ScanResult instance.

Implementation

ScanResult({
  required this.mode,
  required this.rawValue,
  Map<String, String>? fields,
  this.isValid = true,
  this.confidence = 1.0,
  DateTime? timestamp,
  this.imagePath,
  this.rawBytes,
  this.format,
  this.documentCategory,
  this.roi,
  List<String>? enhancementsApplied,
  this.isDuplicate = false,
  this.corners,
  this.boundingBox,
  this.imageSize,
  this.scanDuration,
  Map<String, dynamic>? metadata,
  this.multiResults,
  this.qualityScore,
  this.consensusConfidence,
  Map<String, bool>? verifications,
  Map<String, dynamic>? preprocessingInfo,
  this.bankChequeInfo,
  this.detectedBarcodes,
  this.sessionId,
  this.exportFormat,
  this.encryptionStatus,
  this.watermarkApplied = false,
  this.ocrTextResult,
  List<String>? processingPipeline,
  this.alternativeResults,
  this.detectorName,
  List<String>? postProcessingCorrections,
})  : fields = fields ?? const {},
      timestamp = timestamp ?? DateTime.now(),
      enhancementsApplied = enhancementsApplied ?? const [],
      metadata = metadata ?? {},
      verifications = verifications ?? const {},
      preprocessingInfo = preprocessingInfo ?? const {},
      processingPipeline = processingPipeline ?? const [],
      postProcessingCorrections = postProcessingCorrections ?? const [];