SignalFamily<T, Arg> class

A caching registry that creates and manages a family of Signals based on arguments.

If a signal created by the family has autoDispose enabled, it will automatically evict itself from the cache when it is disposed (observers drop to zero), ensuring memory efficiency.

Constructors

SignalFamily(Signal<T> _creator(Arg arg))
Creates a SignalFamily using the provided _creator function.

Properties

cache Map<Arg, Signal<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) Signal<T>
Retrieves the cached signal for arg, creating it if it doesn't exist.
dispose() → void
Disposes and clears all cached 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