DisposablePod<T> class
abstract
- Inheritance
-
- Object
- WeakChangeNotifier
- DisposablePod
- Implemented types
- Available extensions
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
no setterinherited
- isDisposed → bool
-
Whether this Pod has been disposed of or not.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
toDisposeResources
→ Set<
_ToDisposeResource> -
The list of resources marked for dispose via
willDispose
.no setterinherited - value → T
-
The current value of the object. When the value changes, the callbacks
registered with addListener will be invoked.
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
❌ Do not use this method directly. Use addStrongRefListener instead.
override
-
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> () → ChildPod< TParent, T> -
Available on ValueListenable<
Casts the ValueListenable to a ChildPod.T> , provided by the CastPodListenableX extension -
asDisposablePod(
) → DisposablePod< T> -
Available on ValueListenable<
Casts the ValueListenable to a DisposablePod.T> , provided by the CastPodListenableX extension -
asGenericPod(
) → GenericPod< T> -
Available on ValueListenable<
Casts the ValueListenable to a GenericPod.T> , provided by the CastPodListenableX extension -
asPodDisposable(
) → DisposablePod< T> -
Available on ValueListenable<
T> , provided by the CastPodListenableX extension -
asProtectedPod(
) → ProtectedPod< T> -
Available on ValueListenable<
Casts the ValueListenable to a ProtectedPod.T> , provided by the CastPodListenableX extension -
asRootPod(
) → RootPod< T> -
Available on ValueListenable<
Casts the ValueListenable to a RootPod.T> , provided by the CastPodListenableX extension -
Available on ValueListenable<
Casts the ValueListenable to a SharedPod.T> , provided by the CastPodListenableX extension -
asValueListenable(
) → ValueListenable< T> -
Available on ValueListenable<
Returns the Pod as a ValueListenable.T> , provided by the CastPodListenableX extension -
dispose(
) → void -
Dipsoses this ValueListenable and sets isDisposed to
true
. Successive calls to this method will be ignored.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that the
object notifies.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
willDispose<
T> (T resource, {_OnBeforeCallback< T> ? onBeforeDispose}) → T -
Marks the
resource
for dispose.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited