OperationStateManager<TProgress> class
abstract
Abstract base class for managing operation state with progress tracking.
Provides common functionality for stream-based progress emission, state management, and device-specific tracking.
- Implementers
Constructors
- OperationStateManager({required String deviceId, required TProgress initialState})
Properties
- currentProgress → TProgress
-
Current progress state (last emitted).
no setter
- deviceId → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- idleState → TProgress
-
Returns the idle state for this operation type.
no setter
- isActive ↔ bool
-
Whether an operation is currently active.
getter/setter pair
-
progressStream
→ Stream<
TProgress> -
Stream of progress events.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void - Disposes the manager and closes the stream.
-
emitProgress(
TProgress progress) → void - Emits a progress event to subscribers.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void - Resets the operation state to idle.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited