ScanResult constructor
ScanResult({
- required ScanMode mode,
- required String rawValue,
- required Map<
String, String> fields, - bool isValid = true,
- double confidence = 1.0,
- DateTime? timestamp,
- String? imagePath,
- Uint8List? rawBytes,
- String? format,
- Rect? roi,
- List<
String> ? enhancementsApplied, - bool isDuplicate = false,
- List<
Offset> ? corners, - Rect? boundingBox,
- Size? imageSize,
- Duration? scanDuration,
- Map<
String, dynamic> ? metadata, - List<
ScanResult> ? multiResults,
Creates a new ScanResult instance.
Implementation
ScanResult({
required this.mode,
required this.rawValue,
required this.fields,
this.isValid = true,
this.confidence = 1.0,
DateTime? timestamp,
this.imagePath,
this.rawBytes,
this.format,
this.roi,
List<String>? enhancementsApplied,
this.isDuplicate = false,
this.corners,
this.boundingBox,
this.imageSize,
this.scanDuration,
Map<String, dynamic>? metadata,
this.multiResults,
}) : timestamp = timestamp ?? DateTime.now(),
enhancementsApplied = enhancementsApplied ?? const [],
metadata = metadata ?? {};