flutter_pod library

A dependency injection and state management library for Flutter.

See Pod in GitHub


Creates an AsyncValue with a data.
Creates an AsyncValue in the error state.
Creates an AsyncValue in loading state.
A Notifier implementation that is asynchronously initialized.
A utility for safely manipulating asynchronous data.
A class which exposes a state that can change over time.
A base class for Notifier and AsyncNotifier.
Override Pods.
The base class for all pods.
PodConfigMixin<P extends Pod>
Configuration Mixin for Pod
Responsible for mapping pod's to their state.
PodFuture<F extends Pod, T>
See futurePod.
PodFutureBase<F extends Pod, T>
See futurePod.
PodNotifier<N extends Pod, T>
A Notifier Pod.
PodNotifierBase<N extends Pod, T>
PodNotifier base class.
A widget that stores the state of pods.
Do not use: The State of PodScope.
PodStream<P extends Pod, T>
A Pod for Stream's.
PodStreamBase<P extends Pod, T>
See streamPod.
See pod.
See pod.
Passed to the Pod.read method, allowing you to interact with other pods and manage the lifecycle of your state.
RefreshablePodFuture<F extends Pod, T>
RefreshablePod for Future's.
RefreshablePodNotifier<N extends Pod, T>
RefreshablePod for PodNotifier.
RefreshablePodStream<P extends Pod, T>
RefreshablePod for PodStream class.
See pod.
RefreshableWritablePod<T, V>
Create a Refreshable WritablePod.
Represents an Pod that can be written to.
Expose a PodContainer to the widget tree.
WritablePod<T, V>
Represents an Pod that can be written to.
WritablePodBase<T, V>
Represents an Pod that can be written to.


RefreshablePod mixin that contains a refresh behaviour.
RefreshablePodMixin<P extends RefreshablePod>
RefreshablePodMixin that contains a refreshable method.


An extension that adds methods like guard to an AsyncNotifier.
AsyncValue extension.
An extension that adds methods like when to an AsyncValue.
A BuildContext extension.
Pod extension.
PodFuture extension.


asyncNotifierPod<N extends AsyncNotifier<T>, T>(N create()) PodNotifier<Pod<N>, AsyncValue<T>>
A pod which creates and listen to an AsyncNotifier.
changeNotifierPod<N extends ChangeNotifier, T>(ReaderPod<N> create, T select(N notifier)) PodNotifier<Pod<N>, T>
Create a PodNotifier for a ChangeNotifier, which exposes a value using the given select function.
familyPod<T extends Pod, Arg>(T create(Arg arg)) → T Function(Arg arg)
Create a family factory function, for indexing similar pods with the Arg type.
futurePod<T>(ReaderPod<Future<T>> create) FuturePod<T>
Create a PodFuture that returns a AsyncValue representing the current state of the Future's execution.
internalPodNotifier<N extends Pod, T>(N notifier, T create(Ref<T> ref, N notifier)) PodNotifier<N, T>
Create a Pod that is linked to a notifier Pod.
notifierPod<N extends Notifier<T>, T>(N create()) PodNotifier<Pod<N>, T>
A pod which exposes a Notifier and listens to it.
pod<Value>(ReaderPod<Value> create) ReadPod<Value>
Create a read only pod that can interact with other pod's to create derived state.
statePod<Value>(Value initialValue) WritablePod<Value, Value>
Create a simple pod with mutable state.
streamPod<T>(ReaderPod<Stream<T>> create) StreamPod<T>
Create a Pod of a Stream.
valueListenablePod<T>(ValueListenable<T> create(Ref<ValueListenable<T>> ref)) PodNotifier<Pod<ValueListenable<T>>, T>
Create a PodNotifier that listens to a ValueListenable.
valueNotifierPod<N extends ValueNotifier<T>, T>(ReaderPod<N> create) PodNotifier<Pod<N>, T>
Create a PodNotifier for a ValueNotifier, which exposes the latest value.
weakFamilyPod<T extends Pod, Arg>(T create(Arg arg)) → T Function(Arg arg)
Alternate version of familyPod that holds a weak reference to each child.
writablePod<T, V>(ReaderPod<T> reader, WriterPod<T, V> writer) WritablePod<T, V>
Creates an WritablePod that can be used to implement custom write logic.


FuturePod<T> = PodFuture<Pod<Future<T>>, AsyncValue<T>>
Represents a PodFuture for an async operation.
GetPod = T Function<T>(Pod<T> pod)
Represents a function that retrieves an Pod's value.
ListenerCallback<T> = void Function(T state)
A listener that can be added to a NotifierBase using Notifier.addListener.
ReaderPod<T> = T Function(Ref<T> ref)
A function that creates a value from an Ref
RemoveListener = void Function()
A callback to remove a listener from notifier.
SetPod = void Function<T, V>(WritablePod<T, V> pod, V value)
Represents a function that sets a WritablePod's value.
SetSelf<T> = void Function(T value)
Represents function that sets the current pod's value
StreamPod<T> = PodStream<Pod<Stream<T>>, AsyncValue<T>>
Represents a PodStream for a streaming operation.
WriterPod<T, V> = void Function(GetPod get, SetPod set, SetSelf<T> setSelf, V value)
Represents the writer argument to writablePod

Exceptions / Errors

An error thrown when trying to update the state of a NotifierBase, but at least one of the listeners threw.