ScanResult constructor
ScanResult({
- required ScanMode mode,
- required String rawValue,
- Map<
String, String> ? fields, - bool isValid = true,
- double confidence = 1.0,
- DateTime? timestamp,
- String? imagePath,
- Uint8List? rawBytes,
- String? format,
- String? documentCategory,
- Rect? roi,
- List<
String> ? enhancementsApplied, - bool isDuplicate = false,
- List<
Offset> ? corners, - Rect? boundingBox,
- Size? imageSize,
- Duration? scanDuration,
- Map<
String, dynamic> ? metadata, - List<
ScanResult> ? multiResults, - DocumentQualityScore? qualityScore,
- double? consensusConfidence,
- Map<
String, bool> ? verifications, - Map<
String, dynamic> ? preprocessingInfo, - BankChequeInfo? bankChequeInfo,
- List<
BarcodeResult> ? detectedBarcodes, - String? sessionId,
- String? exportFormat,
- String? encryptionStatus,
- bool watermarkApplied = false,
- OcrTextResult? ocrTextResult,
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,
}) : fields = fields ?? const {},
timestamp = timestamp ?? DateTime.now(),
enhancementsApplied = enhancementsApplied ?? const [],
metadata = metadata ?? {},
verifications = verifications ?? const {},
preprocessingInfo = preprocessingInfo ?? const {};