ValueEmitter<T> class

A simple ChangeEmitter that stores a value, emits a ValueChange whenever the value changes.

Inheritance
Implementers
Available Extensions

Constructors

ValueEmitter(T value, {bool emitDetailedChanges = false})
ValueEmitter.reactive({List<ChangeEmitter<Change>> reactTo, T withValue(), bool emitDetailedChanges = false})
A ValueEmitter that reacts to changes from a list of ChangeEmitters and calls a builder function to get its new value.
ValueEmitter.unmodifiableView(ValueEmitter<T> emitter)

Properties

changes Stream<ValueChange<T>>
The stream of Changes to notify your UI or other state elements that they should update.
read-only, inherited
emitDetailedChanges bool
Whether to emit changes that include detailed information about the specific change. Defaults to false which will emit the same cached change object to minimize garbage collection. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
isDisposed bool
Whether this has been disposed.
read-only, inherited
isNotNull bool
read-only
isNull bool
Whether the current value is null.
read-only
parent ChangeEmitter<Change>
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
unmodifiableView ValueEmitter<T>
read-only
value ↔ T
The current value held.
read / write
values Stream<T>
A stream of new values.
read-only

Methods

addChangeToStream(ValueChange<T> change) → void
Used by subclasses to broadcast Changes.
@protected, inherited
dispose() → void
Disposes resources.
@mustCallSuper, override
findAncestorOfExactType<T extends ChangeEmitter<Change>>() → T
@protected, inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
quietSet(T newValue) → dynamic
Sets a new value and emits a change if the value is different than the old value but will not trigger any parent EmitterContainer to emit a change.
setValue(T newValue) → void
For subclasses to set values without emitting a change
toString() String
A string representation of this object. [...]
inherited

Operators

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