riverpod_injected library

Classes

$ProviderOverride
An object used by ProviderContainer to override the behavior of a provider for a part of the application.
$StreamNotifierProvider<NotifierT extends $StreamNotifier<ValueT>, ValueT>
Implementation detail of riverpod_generator. Do not use.
AnyNotifier<StateT, ValueT> Notifiers
A base class for all "notifiers".
AsyncData<ValueT> Core
Creates an AsyncValue with a data.
AsyncError<ValueT> Core
Creates an AsyncValue in the error state.
AsyncLoading<ValueT> Core
Creates an AsyncValue in loading state.
AsyncResult<ValueT>
A variant of AsyncValue that excludes AsyncLoading.
AsyncValue<ValueT> Core
A utility for safely manipulating asynchronous data.
ContainerConfiguration
A helper class to configure the scoped ProviderContainer.
DisposeMethod
Marks a method of a RiverDi annotated class to be invoked when the generated provider is disposed.
From
Explicitly states the provider a constructor parameter is injected from.
FutureOr<T>
A type representing values that are either Future<T> or T.
Override
An object used by ProviderContainer/ProviderScope to override the behavior of a provider/family for part of the application.
ProviderConstructor
Marks a constructor or static method as the one the generated provider creates instances with.
ProviderContainer Core
An object that stores the state of the providers and allows overriding the behavior of a specific provider.
ProviderFor
An annotation used to help the linter find the user-defined element from the generated provider.
ProviderListenable<StateT>
A base class for all providers, used to consume a provider.
ProviderOrFamily
A common interface shared by ProviderBase and Family
Ref Core
An object used by providers to interact with other providers and the life-cycles of the application.
RiverDi
Generates a riverpod provider that creates instances of the annotated class.
Riverpod
An annotation placed on classes or functions.
RiverpodCommandRunner<TReturn>
A custom CommandRunner that integrates with Riverpod.
ScopedRef
A Ref-like object that is scoped to a riverpodScope call.

Mixins

RiverpodCommand<T>
A mixin that provides access to a ScopedRef for commands.

Extensions

AsyncValueExtensions on AsyncValue<ValueT>
Adds non-state related methods/getters to AsyncValue.

Constants

$internal → const Object
An implementation detail of riverpod_generator. Do not use.
$mustCallSuper → const Object
An implementation detail of riverpod_generator. Do not use.
disposeMethod → const DisposeMethod
Marks a method to be invoked when the generated provider is disposed.
providerConstructor → const ProviderConstructor
Marks a constructor or static method as the one to create instances with.
riverDi → const RiverDi
Generates an auto disposed, synchronous provider for the annotated class.
riverDiAsync → const RiverDi
Generates an auto disposed, asynchronous provider for the annotated class.
riverDiAsyncSingleton → const RiverDi
Generates a keepAlive, asynchronous provider for the annotated class.
riverDiSingleton → const RiverDi
Generates a keepAlive, synchronous provider for the annotated class.
riverpod → const Riverpod
An annotation placed on classes or functions.

Functions

riverpodScope<T>(FutureOr<T> body(ScopedRef), {ProviderContainer? parent, List<Override> overrides = const [], List<ProviderObserver>? observers, Duration? retry(int, Object)?, bool pumpAfterDispose = true}) Future<T>
Runs a function with a ScopedRef that is disposed when the function ends.

Typedefs

Raw<WrappedT> = WrappedT
An annotation for marking a value type as "should not be handled by Riverpod".
WhenComplete = void Function(void cb())?
A Future-like that support synchronous completion.

Exceptions / Errors

MissingScopeException
An exception thrown when a scoped provider is accessed when not yet overridden.