JReadonlyValue<T> class abstract

Base class for all readable reactive values.

JReadonlyValue provides the foundation for reactive values that can be read and tracked as dependencies. It handles disposal, dependency tracking, and notification of subscribers.

Inheritance
Implementers
Available extensions

Constructors

JReadonlyValue({required int flags, Object? pendingValue})
Creates a readable reactive value.

Properties

deps Link?
First dependency link in the chain.
getter/setter pairinherited
depsTail Link?
Last dependency link in the chain.
getter/setter pairinherited
flags int
Reactive flags for this node.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
isDisposed bool
Whether this reactive value has been disposed.
getter/setter pair
peek → T
Returns the current value without establishing a reactive dependency.
no setter
pendingValue Object?
Internal storage for the node's value.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<T>

Available on JReadonlyValue<T>, provided by the JoltStreamValueExtension extension

Converts this reactive value to a broadcast stream.
no setter
subs Link?
First subscriber link in the chain.
getter/setter pairinherited
subsTail Link?
Last subscriber link in the chain.
getter/setter pairinherited
value → T
Returns the current value and establishes a reactive dependency.
no setter

Methods

dispose() → void
Disposes this reactive value and cleans up resources.
get() → T
Returns the current value and establishes a reactive dependency.
listen(void onData(T event)?, {Function? onError, void onDone()?, bool? cancelOnError, bool immediately = false}) StreamSubscription<T>

Available on JReadonlyValue<T>, provided by the JoltStreamValueExtension extension

Creates a stream subscription that listens to changes in this reactive value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify() → void
Notifies all subscribers that this value has changed.
onDispose() FutureOr<void>
Called during the disposal process to perform custom cleanup.
inherited
testNoSubscribers() bool
toString() String
A string representation of this object.
override

Operators

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