MultiScanSession class

Stateful multi-scan session manager providing lifecycle control, automatic duplicate detection, session statistics, and data export.

Inheritance

Constructors

MultiScanSession({String? sessionId, String? name, bool enableDuplicateFilter = true, int? maxItems})
Constructs a MultiScanSession.

Properties

enableDuplicateFilter bool
Whether to automatically filter duplicate scan values within the session.
final
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isActive bool
Whether the session is actively scanning.
no setter
isCompleted bool
Whether the session has completed.
no setter
isFull bool
Whether the session has reached its maximum capacity.
no setter
isPaused bool
Whether the session is paused.
no setter
itemCount int
Number of items in this session.
no setter
maxItems int?
Maximum allowed items in a single session (null = unlimited).
final
name String?
Optional human-readable session name.
final
results List<ScanResult>
Unmodifiable list of scan results collected in this session.
no setter
resultStream Stream<ScanResult>
Stream of new scan results added to this session.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessionId String
Unique session identifier.
final
state SessionState
Current session state.
no setter
stateStream Stream<SessionState>
Stream of session state changes.
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addResult(ScanResult result) bool
Adds a scan result to the session.
cancel() → void
Cancels the scanning session.
clearResults() → void
Clears all results from the session (resets but keeps session active).
complete() → void
Completes the scanning session.
dispose() → void
Discards any resources used by the object.
override
exportToCsv() String
Exports session results as CSV string.
exportToJson({bool pretty = true}) String
Exports session results as JSON string.
exportToPdf({String? title}) Uint8List
Exports session results as PDF byte buffer.
filterByMode(ScanMode mode) List<ScanResult>
Filters session results by scan mode.
getStats() SessionStats
Gets current session statistics.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
pause() → void
Pauses the scanning session temporarily.
removeAt(int index) → void
Removes a result at the specified index.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
resume() → void
Resumes the scanning session from paused state.
Searches session results by query string.
start() → void
Starts or resumes the scanning session.
toString() String
A string representation of this object.
inherited

Operators

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