copyWith method
ScanResult
copyWith({
- ScanMode? mode,
- String? rawValue,
- Map<
String, String> ? fields, - bool? isValid,
- double? confidence,
- DateTime? timestamp,
- String? imagePath,
- Uint8List? rawBytes,
- String? format,
- String? documentCategory,
- Rect? roi,
- List<
String> ? enhancementsApplied, - bool? isDuplicate,
- 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,
- OcrTextResult? ocrTextResult,
- List<
String> ? processingPipeline, - List<
ScanResult> ? alternativeResults, - String? detectorName,
- List<
String> ? postProcessingCorrections,
Creates a copy of ScanResult with updated fields.
Implementation
ScanResult copyWith({
ScanMode? mode,
String? rawValue,
Map<String, String>? fields,
bool? isValid,
double? confidence,
DateTime? timestamp,
String? imagePath,
Uint8List? rawBytes,
String? format,
String? documentCategory,
Rect? roi,
List<String>? enhancementsApplied,
bool? isDuplicate,
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,
OcrTextResult? ocrTextResult,
List<String>? processingPipeline,
List<ScanResult>? alternativeResults,
String? detectorName,
List<String>? postProcessingCorrections,
}) {
return ScanResult(
mode: mode ?? this.mode,
rawValue: rawValue ?? this.rawValue,
fields: fields ?? this.fields,
isValid: isValid ?? this.isValid,
confidence: confidence ?? this.confidence,
timestamp: timestamp ?? this.timestamp,
imagePath: imagePath ?? this.imagePath,
rawBytes: rawBytes ?? this.rawBytes,
format: format ?? this.format,
documentCategory: documentCategory ?? this.documentCategory,
roi: roi ?? this.roi,
enhancementsApplied: enhancementsApplied ?? this.enhancementsApplied,
isDuplicate: isDuplicate ?? this.isDuplicate,
corners: corners ?? this.corners,
boundingBox: boundingBox ?? this.boundingBox,
imageSize: imageSize ?? this.imageSize,
scanDuration: scanDuration ?? this.scanDuration,
metadata: metadata ?? this.metadata,
multiResults: multiResults ?? this.multiResults,
qualityScore: qualityScore ?? this.qualityScore,
consensusConfidence: consensusConfidence ?? this.consensusConfidence,
verifications: verifications ?? this.verifications,
preprocessingInfo: preprocessingInfo ?? this.preprocessingInfo,
bankChequeInfo: bankChequeInfo ?? this.bankChequeInfo,
detectedBarcodes: detectedBarcodes ?? this.detectedBarcodes,
sessionId: sessionId ?? this.sessionId,
exportFormat: exportFormat ?? this.exportFormat,
encryptionStatus: encryptionStatus ?? this.encryptionStatus,
watermarkApplied: watermarkApplied ?? this.watermarkApplied,
ocrTextResult: ocrTextResult ?? this.ocrTextResult,
processingPipeline: processingPipeline ?? this.processingPipeline,
alternativeResults: alternativeResults ?? this.alternativeResults,
detectorName: detectorName ?? this.detectorName,
postProcessingCorrections:
postProcessingCorrections ?? this.postProcessingCorrections,
);
}