ZeroDetectionController class

Fixed-capacity Structure-of-Arrays (SoA) controller for barcode / object detections.

Stores up to capacity detections in a flat Float32List of [left, top, right, bottom, confidence] (5 floats per slot) with zero heap allocations per update.

Constructors

ZeroDetectionController({int capacity = 16})
Creates a ZeroDetectionController with fixed capacity (default 16).

Properties

activeCount → int
Number of currently active detection bounding boxes.
no setter
boxes → Float32List
Flat SoA buffer storing [left, top, right, bottom, confidence] per slot.
final
capacity → int
Maximum number of concurrent detection boxes.
final
hashCode → int
The hash code for this object.
no setterinherited
isDisposed → bool
Whether this controller has been disposed.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Registers a listener notified when detections change.
clearDetections() → void
Clears all active detections immediately.
dispose() → void
Disposes the controller and clears listeners (idempotent).
isActiveAt(int index) → bool
Returns whether detection slot index is active.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeListener(VoidCallback listener) → void
Removes a previously registered listener.
setDetection(int index, double l, double t, double r, double b, double confidence) → void
Sets or updates the detection bounding box at index (0..<capacity).
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

maxCapacity → const int
Maximum allowed detection slots to prevent uncontrolled allocation (CWE-789).