riverpod library

Classes

AlwaysAliveProviderBase<Created, Listened>
A base class for providers that never disposes themselves. [...]
AsyncData<T>
AsyncError<T>
AsyncLoading<T>
AsyncValue<T>
An utility for safely manipulating asynchronous data. [...]
Family<Created, Listened, Param, Ref extends ProviderReference, P extends RootProvider<Created, Listened>>
A base class for all *Family variants of providers.
FutureProvider<T>
A provider that asynchronously creates a single value. [...]
Override
An object used by ProviderContainer/ProviderScope to override the behavior of a provider/family for part of the application. [...]
Provider<T>
A provider that exposes a read-only value. [...]
ProviderBase<Created, Listened>
A base class for all providers.
ProviderContainer
{@template riverpod.providercontainer} An object that stores the state of the providers and allows overriding the behavior of a specific provider. [...]
ProviderListenable<Listened>
A base class for all providers, used to consume a provider. [...]
ProviderObserver
An object that listens to the changes of a ProviderContainer. [...]
ProviderReference
An object used by providers to interact with other providers and the life-cycles of the application. [...]
ProviderSubscription<Listened>
An object that allows watching the state of a provider. [...]
RootProvider<Created, Listened>
{@template riverpod.rootprovider} A base class for non-scoped providers. [...]
ScopedProvider<Listened>
{@template riverpod.scopedprovider} A provider that may behave differently for a specific part of the application. [...]
StateController<T>
A StateNotifier that allows modifying its state from outside. [...]
StateNotifier<T>
An observable class that stores a single immutable state. [...]
StateNotifierProvider<T extends StateNotifier<Object>>
Creates a StateNotifier and expose its current state. [...]
StateProvider<T>
A provider that expose a value which can be modified from outside. [...]
StreamProvider<T>
Creates a stream and expose its latest event. [...]

Mixins

LocatorMixin
A mixin that adds service location capability to an object. [...]

Extensions

AutoDisposeStateFamilyX
Overrides overrideWithProvider for StateProvider.autoDispose.family.
AutoDisposeStateNotifierStateProviderX
Adds state to StateNotifierProvider.autoDispose.
FamilyX
Implements overrideWithProvider for families. [...]
StateFamilyX
Overrides overrideWithProvider for StateProvider.family.
StateNotifierStateProviderX
Adds state to StateNotifierProvider.autoDispose.

Typedefs

Create<T, Ref extends ProviderReference>(Ref ref) → T
A callback used by providers to create the value exposed. [...]
ErrorListener(dynamic error, StackTrace stackTrace) → void
A callback that can be passed to StateNotifier.onError. [...]
Listener<T>(T state) → void
A listener that can be added to a StateNotifier using StateNotifier.addListener. [...]
Locator() → T
A function that allows obtaining other objects. [...]
Reader(RootProvider<Object, T> provider) → T
A function that reads the state of a provider.
RemoveListener() → void
A callback that can be used to remove a listener added with StateNotifier.addListener. [...]
ScopedReader(ProviderBase<Object, T> provider) → T
A function that can both read a ScopedProvider, normal providers and a myProvider.select(..)

Exceptions / Errors

CircularDependencyError
An error thrown when a call to ProviderReference.read/ProviderReference.watch leads to a provider depending on itself. [...]
DependencyNotFoundException<T>
Thrown when tried to call LocatorMixin.read<T>(), but the T was not found.s
ProviderException
Encapulates an exception thrown while building a provider. [...]