PendingExerciseNotifier class

Notifier that reflects any devices which have just been started, but whose status update to reflect a running exercise status is still pending.

When an exercise is started and notifyPending is called, this notifier will update to reflect that a status update is pending. It will listen to device updates until its status reflects that the device has actually started running. Note that it may take several seconds after a device is started for the change to be reflected in the device status.

Inheritance

Constructors

PendingExerciseNotifier()

Properties

debugState Map<int, PendingExerciseSubscription>
A development-only way to access state outside of StateNotifier.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
If a listener has been added using addListener and hasn't been removed yet.
no setterinherited
mounted bool
Whether dispose was called or not.
no setterinherited
onError ErrorListener?
A callback for error reporting if one of the listeners added with addListener throws.
getter/setter pairinherited
pendingDevices List<int>
Returns the list of IDs corresponding to the devices whose status are still pending.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state Map<int, PendingExerciseSubscription>
The current "state" of this StateNotifier.
getter/setter pairinherited
stream Stream<Map<int, PendingExerciseSubscription>>
A broadcast stream representation of a StateNotifier.
no setterinherited

Methods

addListener(Listener<Map<int, PendingExerciseSubscription>> listener, {bool fireImmediately = true}) RemoveListener
Subscribes to this object.
inherited
dispose() → void
Frees all the resources associated with this object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyPending(int deviceId, ExerciseMode exerciseMode, ProviderContainer container, {VoidCallback? onTimeout}) → void
Notify that an exercise has been started on the device with the given ID, and an update to the device's status is pending.
toString() String
A string representation of this object.
inherited
updateShouldNotify(Map<int, PendingExerciseSubscription> old, Map<int, PendingExerciseSubscription> current) bool
Whether to notify listeners or not when state changes
inherited

Operators

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