ScanDetector class abstract
Abstract interface for all scan detection backends.
This interface enables swappable detection engines (ML Kit, TFLite, custom Dart) while maintaining a consistent API contract across the framework.
Inspired by the plugin architecture patterns of Google ML Kit, Dynamsoft, and Scanbot SDK where detection backends are interchangeable.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isReady → bool
-
Whether this detector is initialized and ready to process frames.
no setter
- name → String
-
Human-readable name of this detector (e.g., 'MLKitBarcodeDetector').
no setter
- priority → int
-
Priority level for fallback chain ordering (higher = tried first).
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
supportedModes
→ Set<
ScanMode> -
Set of scan modes this detector supports.
no setter
Methods
-
detect(
dynamic inputImage, ScanMode mode, {Rect? roi}) → Future< DetectionResult> - Detects and processes a frame from a camera image input.
-
detectBytes(
Uint8List bytes, int width, int height, ScanMode mode) → Future< DetectionResult> - Detects and processes a raw byte buffer.
-
dispose(
) → Future< void> - Releases all resources held by this detector.
-
initialize(
) → Future< void> - Initializes the detector and allocates any required resources.
-
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