SaveReactiveProvider<T> class

Inheritance

Constructors

SaveReactiveProvider(FutureOr<T> build(SaveObserver $), {bool autoDispose = true, void onDispose(T last)?})
SaveReactiveProvider.identifiedBy(FutureOr<T> build(SaveObserver $), {required List<Object?>? identification, bool autoDispose = true, void onDispose(T last)?})
DO NOT USE THIS BY YOURSELF To customize the generation of SaveRepositoryKey.

Properties

autoDispose bool
Whether to dispose the state automatically.
final
build FutureOr<T> Function(SaveObserver $)
final
hashCode int
The hash code for this object.
no setterinherited
identification List<Object?>?
If it's not null, used for SaveRepositoryKey.
final
key SaveRepositoryKey
A SaveRepositoryKey to distinguish each SaveObservableImpls.
latefinal
onDispose → void Function(T last)?
Disposes the resources when the state is disposed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createEffect({void onInit(SaveObserver $, T first)?, void onUpdate(SaveObserver $, T value)?, void onDispose(SaveObserver $, T last)?, void orElse(SaveObserver $, T value)?}) SaveReactiveObservableEffect<T>
Creates a SaveEffect for this provider.
override
createLoader(FutureOr<T> load(SaveObserver $)) SaveReactiveLoader<T>
Creates a SaveLoader for this provider.
override
createObservable([FutureOr<T> loader()?]) SaveReactiveObservable<T>
Creates an initial state of SaveState.
override
dispose(T last) → void
Disposes the resources when the state is disposed.
override
load(SaveLoader loader) FutureOr<T>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
runEffect(SaveEffectType type, List<SaveEffect> effects, T value) → void
Runs the SaveEffects.
override
select<S>(S select(T value), {Stream<S> then(Stream<S> source, SaveObserver $)?}) SaveProvider<S>
Modifies the notification timing and the value of the state
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

withArg<T, A>(FutureOr<T> build(SaveObserver $, A arg), {bool autoDispose = true, void onDispose(A arg, T last)?}) SaveReactiveProviderFamily<T, A>
Syntatic sugar for SaveReactiveProviderFamily.new