copyWith method
ScanResult
copyWith({
- ScanMode? mode,
- String? rawValue,
- Map<
String, String> ? fields, - bool? isValid,
- double? confidence,
- DateTime? timestamp,
- String? imagePath,
- Uint8List? rawBytes,
- String? format,
- Rect? roi,
- List<
String> ? enhancementsApplied, - bool? isDuplicate,
- List<
Offset> ? corners, - Rect? boundingBox,
- Size? imageSize,
- Duration? scanDuration,
- Map<
String, dynamic> ? metadata, - List<
ScanResult> ? multiResults,
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,
Rect? roi,
List<String>? enhancementsApplied,
bool? isDuplicate,
List<Offset>? corners,
Rect? boundingBox,
Size? imageSize,
Duration? scanDuration,
Map<String, dynamic>? metadata,
List<ScanResult>? multiResults,
}) {
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,
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,
);
}