WatcherImpl<T> class

Implemented types

Constructors

WatcherImpl(SourcesFn<T> sourcesFn, WatcherFn<T> fn, {bool immediately = false, WhenFn<T>? when, bool detach = false, JoltDebugOption? debug})
WatcherImpl.immediately(SourcesFn<T> sourcesFn, WatcherFn<T> fn, {WhenFn<T>? when, bool detach = false, JoltDebugOption? debug})
factory
WatcherImpl.once(SourcesFn<T> sourcesFn, WatcherFn<T> fn, {WhenFn<T>? when, bool detach = false, JoltDebugOption? debug})
factory

Properties

currentValues ↔ T
The latest source value snapshot cached by this watcher.
getter/setter pair
effect EffectNode
no setteroverride
fn WatcherFn<T>
The callback that runs when this watcher reports a visible change.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isDisposed bool
Whether this node has been disposed.
no setteroverride
isPaused bool
Whether this watcher is currently paused.
no setteroverride
previousValues ↔ T
The previous source value snapshot used for comparisons.
getter/setter pair
raw EffectNode
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourcesFn SourcesFn<T>
The callback that returns the value or snapshot watched by this watcher.
getter/setter pair
testCachedSources → T
no setter
when WhenFn<T>?
The optional predicate that decides whether this watcher should trigger.
getter/setter pair

Methods

dispose() → void
Disposes this node and cleans up resources.
override
ignoreUpdates<U>(U fn()) → U
Runs fn while suppressing watcher callbacks caused by its updates.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCleanup(Disposer fn) → void
Registers a cleanup callback for this watcher.
override
pause() → void
Pauses the watcher and clears its current dependency list.
override
resume() → void
Resumes the watcher and immediately re-collects its dependencies.
override
toString() String
A string representation of this object.
inherited
trigger() → void
Re-runs the watcher callback with the current cached values.
override

Operators

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