BarcodeCountSession class

The count session contains all the currently tracked barcodes and changes that were made specifically in the last processed frame.

The count session should only be accessed from within didScan() to which it is provided as an argument. It is not safe to be accessed from anywhere else since it may be concurrently modified.Specifically no reference to BarcodeCountSession.recognizedBarcodes should be kept and traversed outside of didScan(). Instead a copy of the lists should be made to avoid concurrent modification. The individual tracked barcodes can be referenced without copying as they are not further modified.

Added in version 6.17.0

Constructors

BarcodeCountSession.fromJSON(Map<String, dynamic> event)
factory

Properties

additionalBarcodes → List<Barcode>
The array of additional barcodes injected with BarcodeCount.setAdditionalBarcodes.
no setter
frameId → String
no setterinherited
frameSequenceId → int
The identifier of the current frame sequence.
no setter
hashCode → int
The hash code for this object.
no setterinherited
recognizedBarcodes → List<Barcode>
A list containing all currently recognized barcodes.
no setter
recognizedClusters → List<Cluster>
A list containing all currently recognized clusters.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

getSpatialMap() → Future<BarcodeSpatialGrid?>
Computes the spatial map with the current session data. If a value is returned by this method the scanning is automatically suspended. Returns null if BarcodeCountSettings.mappingEnabled is false.
getSpatialMapWithHints(int expectedNumberOfRows, int expectedNumberOfColumns) → Future<BarcodeSpatialGrid?>
Computes the spatial map with the current session data, using the passed values as hints. If a value is returned by this method the scanning is automatically suspended. Returns null if BarcodeCountSettings.mappingEnabled is false.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → Future<void>
Resets the barcode count session, effectively clearing the history of recognized barcodes. This function should only be called inside the listeners’ callback.
toString() → String
A string representation of this object.
inherited

Operators

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