Readonly<T> class abstract interface

Interface for readonly reactive values.

Readonly provides a read-only interface to reactive values, allowing access to the current value without modification. It supports both tracked and untracked access patterns.

Example:

Readonly<int> count = Signal(0).readonly();
print(count.value); // Tracked access
print(count.peek); // Untracked access
Available extensions

Properties

hashCode int
The hash code for this object.
no setterinherited
listenable JoltValueListenable<T>

Available on Readonly<T>, provided by the JoltValueListenableExtension extension

Converts this Jolt value to a Flutter ValueListenable.
no setter
notifier JoltValueNotifier<T>

Available on Readonly<T>, provided by the JoltValueNotifierExtension extension

Converts this Jolt value to a Flutter ValueNotifier.
no setter
peek → T
Gets the current value without establishing a reactive dependency.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T
Gets the current value and establishes a reactive dependency.
no setter

Methods

get() → T
Gets the current value and establishes a reactive dependency.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify() → void
Manually notifies all subscribers that this value has changed.
toString() String
A string representation of this object.
inherited

Operators

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