Ref class abstract
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.
- Implementers
- Available extensions
Constructors
- Ref.new()
Properties
- container → RiverpieContainer
-
Returns the backing container.
The container exposes more advanced methods for edge cases.
no setter
- debugOwnerLabel → String
-
Returns the owner of this Ref.
Usually, this is a notifier or a widget.
Used by Ref.redux to log the origin of the action.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispatch<
R> (GlobalActionWithResult< R> action) → R -
Available on Ref, provided by the GlobalActionExtension extension
Dispatches a global action. Returns the result of the action. -
dispatchAsync<
R> (AsyncGlobalActionWithResult< R> action) → Future<R> -
Available on Ref, provided by the GlobalActionExtension extension
Dispatches an async global action. Returns the result of the action. -
dispose<
N extends BaseNotifier< (T> , T>BaseProvider< N, T> provider) → void -
Disposes a
provider
. Be aware that streams (ref.stream) are closed also. You may call this method in the dispose method of a stateful widget. Note: Theprovider
will be initialized again on next access. -
future<
N extends AsyncNotifier< (T> , T>AsyncNotifierProvider< N, T> provider) → Future<T> - Get the Future of an AsyncNotifierProvider.
-
message(
String message) → void -
Emits a message to the observer.
This might be handy if you use
RiverpieTracingPage
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifier<
N extends BaseNotifier< (T> , T>NotifyableProvider< N, T> provider) → N - Get the notifier of a provider.
-
read<
N extends BaseNotifier< (T> , T>BaseProvider< N, T> provider) → T - Get the current value of a provider without listening to changes.
-
redux<
N extends BaseReduxNotifier< (T> , T, E extends Object>ReduxProvider< N, T> provider) → Dispatcher<N, T> - Get a proxy class to dispatch actions to a ReduxNotifier.
-
stream<
N extends BaseNotifier< (T> , T>BaseProvider< N, T> provider) → Stream<NotifierEvent< T> > - Listen for changes to a provider.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited