PodContainer class

Responsible for mapping pod's to their state.

Each pod corresponds to a Node, which contains the current state for that pod.


PodContainer({List<Override> overrides = const []})
Container constructor.


hashCode int
The hash code for this object.
no setterinherited
nodes HashMap<Pod, Node?>
The state map, where each pod has a corresponding Node.
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


get<T>(Pod<T> pod) → T
Retrieve the state for the given Pod, creating or rebuilding it when required.
mount(Pod pod) → void Function()
Listen to a pod, but don't register a handler function.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
refresh(RefreshablePod pod) → void
Manually recalculate a pod's value.
set<T, V>(WritablePodBase<T, V> pod, V value) → void
Set the state of a WritablePod.
stream<T>(Pod<T> pod) Stream<T>
Listen to a pod as a Stream.
subscribe<T>(Pod pod, void handler(T value), {bool fireImmediately = false}) → void Function()
Listen to changes of a pod's state.
subscribeWithPrevious<T>(Pod<T> pod, void handler(T? previous, T value), {bool fireImmediately = false}) → void Function()
Listen to changes of a pod's state, and retrieve the latest value.
toString() String
A string representation of this object.
use<T>(Pod pod, FutureOr<T> cb()) Future<T>
Listen to a pod, run the given cb (which can return a Future), then remove the listener once the cb is complete.


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