riverpie
library
Classes
AbstractChangeEvent <T >
A flag that is applied for ChangeEvent and RebuildEvent .
ActionDispatchedEvent
An action has been dispatched.
Usually, a ChangeEvent directly follows this event.
If the action is asynchronous, the ChangeEvent can be delayed.
ActionErrorEvent
An action threw an error.
ActionFinishedEvent
An action has been finished successfully.
AsyncData <T >
The data of an AsyncValue .
AsyncError <T >
The error of an AsyncValue .
AsyncGlobalAction
An asynchronous global action without a result.
AsyncGlobalActionWithResult <R >
An asynchronous global action with a result.
AsyncLoading <T >
The loading state of an AsyncValue .
AsyncNotifier <T >
An AsyncNotifier is a notifier that holds the state of an AsyncSnapshot
.
It is used for business logic that depends on asynchronous operations.
AsyncNotifierProvider <N extends AsyncNotifier <T > , T >
Use an AsyncNotifierProvider to implement a stateful provider.
Changes to the state are propagated to all consumers that
called watch
on the provider.
AsyncReduxAction <N extends BaseReduxNotifier<T > , T >
The asynchronous action that is dispatched by a ReduxNotifier .
Trigger this with dispatchAsync .
AsyncReduxActionWithResult <N extends BaseReduxNotifier<T > , T , R >
The asynchronous action that is dispatched by a ReduxNotifier .
AsyncValue <T >
BaseReduxAction <N extends BaseReduxNotifier<T > , T , R >
The action that is dispatched by a ReduxNotifier .
You should use ReduxAction or AsyncReduxAction instead.
ChangeEvent <T >
The most frequent event.
A notifier changed its state and notifies all listeners
that they should rebuild.
ChangeNotifier
A notifier that can trigger notifyListeners to trigger rebuilds.
It has access to ref for fast development.
ChangeNotifierProvider <N extends ChangeNotifier >
Use a NotifierProvider to implement a stateful provider.
Changes to the state are propagated to all consumers that
called watch
on the provider.
ChronicleSnapshot <T >
CustomLabeledReference
This class allows you to create a custom LabeledReference
of any object.
Dispatcher <N extends BaseReduxNotifier<T > , T >
A proxy class to provide a custom debugOrigin for dispatch .
FutureFamilyProvider <T , P >
A FutureFamilyProvider is a special version of FutureProvider that
allows you to watch a collection of Future s.
FutureFamilyProviderNotifier <T , P >
The corresponding notifier for a FutureFamilyProvider .
FutureFamilyProviderProxy <T , P >
A proxy class to make WatchableRef.watch work with FutureFamilyProvider .
FutureProvider <T >
A FutureProvider is a custom implementation of a AsyncNotifierProvider
that allows you to watch a Future .
FutureProviderNotifier <T >
The corresponding notifier for a FutureProvider .
GlobalAction
A synchronous global action without a result.
GlobalActionDispatcher
GlobalActionWithResult <R >
A synchronous global action with a result.
GlobalRedux
The corresponding global redux notifier.
HistoryObserverConfig
The configuration of the RiverpieHistoryObserver .
It defines which events are saved.
ImmutableNotifier <T >
A notifier that is immutable.
The state of the notifier is provided in the constructor.
LabeledReference
An arbitrary object that has a debugLabel property.
MessageEvent
A custom message.
This is useful for debugging.
Notifier <T >
A notifier holds a state and notifies its listeners when the state changes.
The listeners are added automatically when calling ref.watch
.
NotifierEvent <T >
The object that gets fired by the stream.
NotifierProvider <N extends BaseSyncNotifier<T > , T >
Use a NotifierProvider to implement a stateful provider.
Changes to the state are propagated to all consumers that
called watch
on the provider.
NotifierSnapshot <T >
A snapshot of the AsyncNotifier .
Provider <T >
Use a Provider to implement a stateless provider.
Useful for dependency injection.
Often used with overrideWithValue during initialization of the app.
ProviderDisposeEvent
A provider has been disposed.
This does not happen automatically but only when
ref.dispose(provider) is called.
ProviderInitEvent
A provider is initialized (happens only once per runtime).
This happens either immediately during provider override or
lazily when the provider is accessed the first time.
ProviderOverride <N extends BaseNotifier<T > , T >
Instructs Riverpie to set a predefined state for a provider.
PureNotifier <T >
A Notifier but without ref
making this notifier self-contained.
RebuildEvent <T >
A ViewProvider has been rebuilt. (NOT widget rebuild)
This is very similar to a ChangeEvent but instead of one action,
there can be multiple pairs of actions and notifiers.
ReduxAction <N extends BaseReduxNotifier<T > , T >
The action that is dispatched by a ReduxNotifier .
Trigger this with dispatch .
ReduxActionWithResult <N extends BaseReduxNotifier<T > , T , R >
The action that is dispatched by a ReduxNotifier .
ReduxNotifier <T >
A notifier where the state can be updated by dispatching actions
by calling dispatch
.
ReduxProvider <N extends BaseReduxNotifier<T > , T >
Holds a ReduxNotifier
Ref
The base ref to read and notify providers.
These methods can be called anywhere.
Even within dispose methods.
The primary difficulty is to get the Ref in the first place.
RiverpieCallbackObserver
An observer where you can specify the behavior right in the constructor.
This is useful for testing to avoid boilerplate code.
RiverpieContainer
The RiverpieContainer holds the state of all providers.
Every provider state is initialized lazily and only once.
RiverpieDebugObserver
A plug-and-play RiverpieObserver that prints every action into
the console for easier debugging.
RiverpieEvent
The base event.
RiverpieHistoryObserver
An observer that stores every event in a list.
This is useful for testing to keep track of the events.
RiverpieMultiObserver
The observer to use multiple observers at once.
RiverpieObserver
The observer receives every RiverpieEvent .
It is up to the implementation of how to use it.
RiverpieTracingObserver
A more sophisticated version of RiverpieHistoryObserver .
This should be used in combination with RiverpieTracingPage
.
StateNotifier <T >
A pre-implemented notifier for simple use cases.
You may add a listener
to retrieve every setState event.
StateProvider <T >
A StateProvider is a custom implementation of a NotifierProvider
that implements a default notifier with a setState
method.
TestableReduxNotifier <T >
A wrapper for BaseReduxNotifier
that exposes setState and state .
This is useful for unit tests.
TracingNotifier
ViewProvider <T >
The ViewProvider is the only provider that can watch other providers.
Its builder is similar to a normal Provider .
A common use case is to define a view model that depends on many providers.
Don't worry about the ref
, you can use it freely inside any function.
The ref
will never become invalid.
ViewProviderNotifier <T >
WatchableRef
The ref available in a State
with the mixin or in a ViewProvider .
Enums
ActionLifecycle
The location of an error.
NotifyStrategy
This enum controls the default behaviour of updateShouldNotify
.
Keep in mind that you can override updateShouldNotify
in your notifiers
to implement a custom behaviour.
ProviderInitCause