DetectionResult class
Raw detection result from a ScanDetector.
Contains the unprocessed output from the detection backend, before any parsing, validation, or post-processing is applied.
Constructors
-
DetectionResult({required ScanMode mode, required String detectorName, bool hasContent = false, String rawText = '', double confidence = 0.0, List<
BarcodeResult> barcodes = const [], List<Rect> boundingBoxes = const [], List<List< cornerSets = const [], Map<Offset> >String, dynamic> metadata = const {}, Duration detectionTime = Duration.zero}) -
const
- DetectionResult.empty(ScanMode mode, String detectorName)
-
Creates an empty detection result (no content found).
factory
Properties
-
barcodes
→ List<
BarcodeResult> -
Individual barcode detection results (for barcode/QR modes).
final
-
boundingBoxes
→ List<
Rect> -
Detected bounding boxes in image coordinates.
final
- confidence → double
-
Detection confidence (0.0–1.0).
final
-
cornerSets
→ List<
List< Offset> > -
Detected corner points in image coordinates.
final
- detectionTime → Duration
-
Time taken for detection.
final
- detectorName → String
-
Name of the detector that produced this result.
final
- hasContent → bool
-
Whether detection found any valid content.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
metadata
→ Map<
String, dynamic> -
Raw detection metadata from the backend.
final
- mode → ScanMode
-
The scan mode that produced this result.
final
- rawText → String
-
Raw text payload (for OCR, MRZ, barcode value, etc.).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited