ScanResult constructor

ScanResult({
  1. required ScanMode mode,
  2. required String rawValue,
  3. required 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. Rect? roi,
  11. List<String>? enhancementsApplied,
  12. bool isDuplicate = false,
  13. List<Offset>? corners,
  14. Rect? boundingBox,
  15. Size? imageSize,
  16. Duration? scanDuration,
  17. Map<String, dynamic>? metadata,
  18. 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 ?? {};