PodNotifier<T extends Object> class abstract

An enhanced alternative to ValueNotifier that provides additional lifecycle management capabilities through the ValueListenable.

Inheritance
Available extensions

Constructors

PodNotifier.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isDisposed bool
Whether this Pod has been disposed of or not.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value ↔ T
The current value of the object. When the value changes, the callbacks registered with addListener will be invoked.
getter/setter pairoverride-getter

Methods

addListener(VoidCallback listener) → void
❌ Do not use this method directly. Use addStrongRefListener instead.
inherited
addSingleExecutionListener(VoidCallback listener) → void
Registers a listener that will be called only once when the object notifies its listeners. After the listener is called, it is automatically removed.
inherited
addStrongRefListener({required VoidCallback strongRefListener}) → void
Register a closure to be called when the object notifies its listeners.
inherited
asChildPod<TParent extends Object>() ChildPod<TParent, T>

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

Casts the ValueListenable to a ChildPod.
asDisposablePod() DisposablePod<T>

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

Casts the ValueListenable to a DisposablePod.
asGenericPod() GenericPod<T>

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

Casts the ValueListenable to a GenericPod.
asProtectedPod() ProtectedPod<T>

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

Casts the ValueListenable to a ProtectedPod.
asRootPod() RootPod<T>

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

Casts the ValueListenable to a RootPod.
asSharedPod<TRawValue extends Object>() SharedPod<T, TRawValue>

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

Casts the ValueListenable to a SharedPod.
asValueListenable() ValueListenable<T>

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

Returns the Pod as a ValueListenable.
dispose() → void
Dipsoses this ValueListenable and sets isDisposed to true. Successive calls to this method will be ignored.
inherited
getValue() → T
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() String
A string representation of this object.
inherited

Operators

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