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.
AutoDisposeFutureProvider<T>
A provider that asynchronously creates a single value.
AutoDisposeFutureProviderFamily<T, A>
A class that allows building a FutureProvider from an external parameter.
AutoDisposeProvider<T>
A provider that exposes a read-only value.
AutoDisposeProviderBase<Created, Listened>
A base class for providers that destroy their state when no-longer listened.
AutoDisposeProviderElement<Created, Listened>
The ProviderElement of an AutoDisposeProviderBase.
AutoDisposeProviderFamily<T, A>
A class that allows building a Provider from an external parameter.
AutoDisposeProviderReference
A ProviderReference for providers that are automatically destroyed when no-longer used.
AutoDisposeStateNotifierProvider<Notifier extends StateNotifier<Value>, Value>
Creates a StateNotifier and expose its current state.
AutoDisposeStateNotifierProviderFamily<Notifier extends StateNotifier<Value>, Value, Param>
A class that allows building a StateNotifierProvider from an external parameter.
AutoDisposeStateProvider<T>
A provider that expose a value which can be modified from outside.
AutoDisposeStateProviderFamily<T, A>
A class that allows building a StateProvider from an external parameter.
AutoDisposeStreamProvider<T>
Creates a stream and expose its latest event.
AutoDisposeStreamProviderFamily<T, A>
A class that allows building a StreamProvider from an external parameter.
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.
FutureProviderFamily<T, A>
A class that allows building a FutureProvider from an external parameter.
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
An object that stores the state of the providers and allows overriding the behavior of a specific provider.
ProviderElement<Created, Listened>
An internal class that handles the state of a provider.
ProviderFamily<T, A>
A class that allows building a Provider from an external parameter.
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>
A base class for non-scoped providers.
ScopedProvider<Listened>
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<Notifier extends StateNotifier<Value>, Value>
Creates a StateNotifier and expose its current state.
StateNotifierProviderFamily<Notifier extends StateNotifier<Value>, Value, Param>
A class that allows building a StateNotifierProvider from an external parameter.
StateProvider<T>
A provider that expose a value which can be modified from outside.
StateProviderFamily<T, A>
A class that allows building a StateProvider from an external parameter.
StreamProvider<T>
Creates a stream and expose its latest event.
StreamProviderFamily<T, A>
A class that allows building a StreamProvider from an external parameter.

Extensions

AutoDisposeStateFamilyX on Family<StateController<T>, StateController<T>, Param, AutoDisposeProviderReference, AutoDisposeStateProvider<T>>
Overrides overrideWithProvider for StateProvider.autoDispose.family.
FamilyX on Family<Created, Listened, Param, Ref, P>
Implements overrideWithProvider for families.
StateFamilyX on Family<StateController<T>, StateController<T>, Param, ProviderReference, StateProvider<T>>
Overrides overrideWithProvider for StateProvider.family.

Typedefs

Create<T, Ref extends ProviderReference> = T Function(Ref ref)
A callback used by providers to create the value exposed.
ErrorListener = void Function(Object error, StackTrace? stackTrace)
A callback that can be passed to StateNotifier.onError.
Locator = T Function<T>()
A function that allows obtaining other objects.
Reader = T Function<T>(RootProvider<Object?, T> provider)
A function that reads the state of a provider.
RemoveListener = void Function()
A callback that can be used to remove a listener added with StateNotifier.addListener.
ScopedCreate<T> = T Function(ScopedReader watch)
The function that ScopedProviders uses to create their state.
ScopedReader = T Function<T>(ProviderBase<Object?, T> provider)
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.
StateNotifierListenerError
An error thrown when tried to update the state of a StateNotifier, but at least of the listeners threw.