ChangeWatcher<T> class

A state watcher class

This class is used in watching variables for state changes, and is able to recieve and emit state changes.

This is used in watching specific variables that can be referenced by their type T and their initial value initValue

Mixed-in types
Implementers

Constructors

ChangeWatcher({required T initValue, State<T>? state})

Properties

currentState Future<State<T>>
no setter
currentStateChange StateChange<T>?
The current state change that has occured on the watched variable and initialState, or null if there have been no recent changes.
getter/setter pair
currentValue → T
The current value of the watched variable
no setter
emittedStream Stream<T>
Stream for listening to variable value changes
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
initialState State<T>
The state of the watched variable
getter/setter pair
initValue ↔ T
The initial value of the watched variable.
getter/setter pair
receivedStream Stream<T>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
valueStream Stream<T>
Stream for listening to variable value changes
no setter

Methods

applyState() → void
Function used in making a copy of the current state of an object to be implemented elsewhere in code.
override
dispose() → void
Dispose method to close the stream when no longer needed
emit() → void
Function used in emitting state changes
emitStream(Stream<T> stream) → void
Function used in emitting a stream of state changes
freeze() → void
Function used to freeze state.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
ping() → void
receive() → void
Function used in receiving state changes
receiveStream(Stream<T> stream) → void
Function used in emitting a stream of state changes
reload() → void
Function used to refresh or reload state.
override
toString() String
A string representation of this object.
inherited
unfreeze() → void
Function used to unfreeze state.
override
watchVariable(T variable) → void
Function used to watch the variable for changes.

Operators

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