riverpod library

Classes

AlwaysAliveProviderBase<State>
A base class for providers that never disposes themselves.
AsyncData<T>
Creates an AsyncValue with a data.
AsyncError<T>
Creates an AsyncValue in error state.
AsyncLoading<T>
Creates an AsyncValue in loading state.
AsyncValue<T>
An utility for safely manipulating asynchronous data.
AutoDisposeFutureProvider<State>
A provider that asynchronously creates a single value.
AutoDisposeFutureProviderFamily<State, Arg>
A class that allows building a AutoDisposeFutureProvider from an external parameter.
AutoDisposeFutureProviderRef<State>
An object used by providers to interact with other providers and the life-cycles of the application.
AutoDisposeProvider<State>
A provider that exposes a read-only value.
AutoDisposeProviderBase<State>
A base class for providers that destroy their state when no-longer listened.
AutoDisposeProviderElement<State>
An AutoDisposeProviderElementBase for AutoDisposeProvider
AutoDisposeProviderElementBase<State>
The ProviderElementBase of an AutoDisposeProviderBase.
AutoDisposeProviderFamily<State, Arg>
A class that allows building a Provider from an external parameter.
AutoDisposeProviderRef<State>
An object used by providers to interact with other providers and the life-cycles of the application.
AutoDisposeRef
A Ref for providers that are automatically destroyed when no-longer used.
AutoDisposeStateNotifierProvider<Notifier extends StateNotifier<State>, State>
Creates a StateNotifier and expose its current state.
AutoDisposeStateNotifierProviderFamily<Notifier extends StateNotifier<State>, State, Arg>
A class that allows building a StateNotifierProvider from an external parameter.
AutoDisposeStateNotifierProviderRef<Notifier extends StateNotifier<State>, State>
An object used by providers to interact with other providers and the life-cycles of the application.
AutoDisposeStateProvider<State>
A provider that expose a value which can be modified from outside.
AutoDisposeStateProviderElement<State>
The ProviderElementBase for StateProvider
AutoDisposeStateProviderFamily<State, Arg>
AutoDisposeStateProviderRef<State>
An object used by providers to interact with other providers and the life-cycles of the application.
AutoDisposeStreamProvider<State>
Creates a stream and expose its latest event.
AutoDisposeStreamProviderFamily<State, Arg>
A class that allows building a StreamProvider from an external parameter.
AutoDisposeStreamProviderRef<State>
An object used by providers to interact with other providers and the life-cycles of the application.
Family<State, Arg, FamilyProvider extends ProviderBase<State>>
A base class for all families
FamilyOverride<Arg>
Do not use: Internal object to used by ProviderContainer/ProviderScope to override the behavior of a "family" for part of the application.
FutureProvider<State>
A provider that asynchronously creates a single value.
FutureProviderFamily<State, Arg>
A class that allows building a AutoDisposeFutureProvider from an external parameter.
FutureProviderRef<State>
An object used by providers to interact with other providers and the life-cycles of the application.
Override
An object used by ProviderContainer/ProviderScope to override the behavior of a provider/family for part of the application.
Provider<State>
A provider that exposes a read-only value.
ProviderBase<State>
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<State>
A provider that exposes a read-only value.
ProviderElementBase<State>
An internal class that handles the state of a provider.
ProviderFamily<State, Arg>
A class that allows building a Provider from an external parameter.
ProviderListenable<State>
A base class for all providers, used to consume a provider.
ProviderObserver
An object that listens to the changes of a ProviderContainer.
ProviderOverride
An object used by ProviderContainer to override the behavior of a provider for a part of the application.
ProviderRef<State>
An object used by providers to interact with other providers and the life-cycles of the application.
ProviderSubscription<State>
Represents the subscription to a provider
Ref
An object used by providers to interact with other providers and the life-cycles 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<State>, State>
Creates a StateNotifier and expose its current state.
StateNotifierProviderFamily<Notifier extends StateNotifier<State>, State, Arg>
A class that allows building a StateNotifierProvider from an external parameter.
StateNotifierProviderRef<Notifier extends StateNotifier<State>, State>
An object used by providers to interact with other providers and the life-cycles of the application.
StateProvider<State>
A provider that expose a value which can be modified from outside.
StateProviderElement<State>
The ProviderElementBase for StateProvider
StateProviderFamily<State, Arg>
StateProviderRef<State>
An object used by providers to interact with other providers and the life-cycles of the application.
StreamProvider<State>
Creates a stream and expose its latest event.
StreamProviderFamily<State, Arg>
A class that allows building a StreamProvider from an external parameter.
StreamProviderRef<State>
An object used by providers to interact with other providers and the life-cycles of the application.

Mixins

AlwaysAliveProviderListenable<State>
A base class for all providers, used to consume a provider.
StateNotifierProviderOverrideMixin<Notifier extends StateNotifier<State>, State>
Add overrideWithValue to AutoDisposeStateNotifierProvider

Extensions

AlwaysAliveAsyncProviderX on AlwaysAliveProviderBase<AsyncValue<State>>
Adds future and stream to providers that emit an AsyncValue
AsyncValueX on AsyncValue<T>
An extension that adds methods like when to an AsyncValue.
AutoDisposeAsyncProviderX on AutoDisposeProviderBase<AsyncValue<State>>
Adds future and stream to autoDispose providers that emit an AsyncValue
XAutoDisposeFamily on Family<State, Arg, FamilyProvider>
An extension that adds overrideWithProvider to Family.
XFamily on Family<State, Arg, FamilyProvider>
An extension that adds overrideWithProvider to Family.

Typedefs

Create<T, R extends Ref> = T Function(R 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.
FamilyCreate<T, R extends Ref, Arg> = T Function(R ref, Arg arg)
A Create equivalent used by Family.
Locator = T Function<T>()
A function that allows obtaining other objects.
ProviderReference = Ref
Alias for Ref
Reader = T Function<T>(ProviderBase<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.
SetupOverride = void Function({required ProviderBase origin, required ProviderBase override})
An implementation detail for the override mechanism of providers

Exceptions / Errors

CircularDependencyError
An error thrown when a call to Ref.read/Ref.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.