JoltValueNotifier<T> class

A ValueNotifier that wraps a Jolt Writable value.

Provides Flutter's ValueNotifier interface with bidirectional sync. Changes to either the Jolt value or ValueNotifier are synchronized.

Example:

final signal = Signal(42);
final notifier = signal.notifier;

AnimatedBuilder(
  animation: notifier,
  builder: (context, child) => Text('${notifier.value}'),
)
Implemented types
Available extensions

Constructors

JoltValueNotifier(Writable<T> node)
Creates a ValueNotifier from a Jolt Writable.

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
no setterinherited
node Writable<T>
The wrapped Jolt Writable value.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value ↔ T
The current value stored in this notifier.
getter/setter pairoverride

Methods

addListener(VoidCallback listener) → void
inherited
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
inherited
removeListener(VoidCallback listener) → void
inherited
toListenableSignal({JoltDebugOption? debug}) ReadonlySignal<T>

Available on ValueListenable<T>, provided by the JoltValueListenableSignalExtension extension

Converts this ValueListenable to a read-only Signal.
toNotifierSignal({JoltDebugOption? debug}) Signal<T>

Available on ValueNotifier<T>, provided by the JoltValueNotifierSignalExtension extension

Converts this ValueNotifier to a Signal with bidirectional sync.
toString() String
A string representation of this object.
inherited

Operators

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