StreamEventProvider<T, E> class
abstract
Base class implemented by classes that provide an event listener.
- Inheritance
-
- Object
- StreamValue<
T> - StreamEventProvider
- Implementers
Constructors
-
StreamEventProvider(T value, {OnUpdate<
T> ? onUpdate, OnEvent<E> ? onEvent}) - Base constructor implemented by classes that provide an event listener.
Properties
- hasEvent → bool
-
Returns
true
if there are any active event listeners or if onEvent is set.no setter - hasEventListener → bool
-
Returns
true
if there are any active event listeners.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- hasListener → bool
-
Returns
true
if there are any active listeners.no setterinherited - hasUpdate → bool
-
Returns
true
if there are any active update listeners or if onUpdate is set.no setter - isObserved → bool
-
Returns
true
if there are any active listeners or if onUpdate is notnull
.no setteroverride - numberOfEventListeners → int
-
Returns the number of active event listeners.
no setter
- numberOfListeners → int
-
Returns the number of active listeners.
no setterinherited
-
onEvent
↔ OnEvent<
E> ? -
Called when an element is added, removed, or updated in the
list/map before onUpdate is called and before the listeners
are notified of the new value.
getter/setter pair
-
onUpdate
↔ OnUpdate<
T> ? -
Called after value is updated, before the listeners are notified.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ T
-
The value being observed.
getter/setter pairinherited
- wasDisposed ↔ bool
-
Set to
true
when dispose is called.getter/setter pairinherited
Methods
-
addEventListener(
OnEvent< E> onEvent) → StreamSubscription<E> - Registers a new StreamSubscription that provides a CollectionEvent denoting when any elements have been added, removed, or updated in the collection.
-
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
-
notifyEventListeners(
E event) → void -
Notifies all subscribed event listeners of an
event
. -
notifyListeners(
T event) → void -
Notifies all subscribed listeners of an
event
.inherited -
removeEventListener(
) → void - Cancels and removes an event listener.
-
removeListener(
) → void -
Cancels and removes a StreamSubscription.
inherited
-
setValue(
T value) → void -
Sets the observable value to
value
without notifying the event listeners.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited