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
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 givencb
(which can return a Future), then remove the listener once thecb
is complete.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited