PodContainer class

Responsible for mapping pod's to their state.

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

Constructors

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

Properties

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

Methods

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.
inherited
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.
inherited
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.

Operators

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