AsyncSignalFamily<T, Arg> class
A caching registry that creates and manages a family of AsyncSignals based on arguments.
If an async signal created by the family has autoDispose enabled, it will automatically
evict itself from the cache when it is disposed, ensuring memory efficiency.
Constructors
-
AsyncSignalFamily(AsyncSignal<
T> _creator(Arg arg)) -
Creates an AsyncSignalFamily using the provided
_creatorfunction.
Properties
-
cache
→ Map<
Arg, AsyncSignal< T> > -
Exposed for testing purposes to inspect the cache.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
Arg arg) → AsyncSignal< T> -
Retrieves the cached async signal for
arg, creating it if it doesn't exist. -
dispose(
) → void - Disposes and clears all cached async signals in this family.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited