StreamValue<T> class
A observable object that notifies its subscribers when its value has been modified.
- Mixed in types
- Implementers
Constructors
-
StreamValue(T value, {OnUpdate<
T> ? onUpdate}) - A observable object that notifies its subscribers when its value has been modified.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListener → bool
-
Returns
true
if there are any active listeners.no setterinherited - isObserved → bool
-
Returns
true
if there are any active listeners or if onUpdate is notnull
.no setter - numberOfListeners → int
-
Returns the number of active listeners.
no setterinherited
-
onUpdate
↔ OnUpdate<
T> ? -
Called after value is updated, before the listeners are notified.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ T
-
The value being observed.
getter/setter pair
- wasDisposed ↔ bool
-
Set to
true
when dispose is called.getter/setter pair
Methods
-
addListener(
OnUpdate< T> onUpdate) → StreamSubscription<T> -
Creates, stores and returns a listener.
inherited
-
dispose(
) → void -
Cancels any active listeners and closes the stream.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
T event) → void -
Notifies all subscribed listeners of an
event
.override -
removeListener(
) → void -
Cancels and removes a StreamSubscription.
inherited
-
setValue(
T value) → void -
Sets the observable value to
value
without notifying the event listeners. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited