BarcodeSelectionSession class
Holds the ongoing state of a running BarcodeSelection. An instance of this class is passed to BarcodeSelectionListener.didUpdateSelection() when new barcodes are selected or currently selected barcodes are unselected.
The barcode selection session should only be accessed from within didUpdateSelection() 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 BarcodeSelectionSession.selectedBarcodes should be kept and traversed outside of didUpdateSelection(). Instead a copy of the list should be made to avoid concurrent modification. The individual barcodes can be referenced without copying as they are not further modified.
Added in version 6.10.0
Constructors
-
BarcodeSelectionSession.fromJSON(Map<
String, dynamic> event) -
factory
Properties
- 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
-
newlySelectedBarcodes
→ List<
Barcode> -
List of codes that were newly selected in the last processed frame.
no setter
-
newlyUnselectedBarcodes
→ List<
Barcode> -
List of codes that were unselected in the last processed frame.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selectedBarcodes
→ List<
Barcode> -
List of currently selected codes.
no setter
Methods
-
getCount(
Barcode barcode) → Future< int> - Returns how many times the given Barcode was selected.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → Future< void> - Resets the barcode selection session, effectively clearing the history of selected codes. This function should only be called inside the listeners’ callback. To call it from another thread, use BarcodeSelection.reset.
-
selectUnselectedBarcodes(
) → Future< void> - Select all the unselected barcodes that are currently being tracked in this barcode selection session.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited