AsyncNotifierProviderElement<NotifierT extends AsyncNotifierBase<T>, T> class

The element of AsyncNotifierProvider.

Inheritance
Implemented types
Implementers

Properties

container → ProviderContainer
The ProviderContainer that owns this ProviderElementBase.
no setterinherited
debugAssertDidSetStateEnabled → bool
Whether the assert that prevents requireState from returning if the state was not set before is enabled.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether this ProviderElementBase is currently listened to or not.
no setterinherited
origin → ProviderBase<Object?>
The provider associated with this ProviderElementBase, before applying overrides.
no setterinherited
provider → ProviderBase<AsyncValue<T>>
The provider associated with this ProviderElementBase, after applying overrides.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state ↔ AsyncValue<T>
Handles manual state change (as opposed to automatic state change from listening to the Future).
getter/setter pairinherited

Methods

create({required bool didChangeDependency}) → void
Initialize a provider.
override
debugReassemble() → void
A life-cycle executed when a hot-reload is performed.
inherited
dispose() → void
Release the resources associated to this ProviderElementBase.
inherited
exists(ProviderBase<Object?> provider) → bool
Determines whether a provider is initialized or not.
inherited
invalidate(ProviderOrFamily provider) → void
Invalidates the state of the provider, destroying the state immediately and causing the provider to rebuild at some point in the future.
inherited
invalidateSelf() → void
Invalidates the state of the provider, causing it to refresh.
inherited
keepAlive() → KeepAliveLink
Requests for the state of a provider to not be disposed when all the listeners of the provider are removed.
inherited
listen<T>(ProviderListenable<T> listenable, void listener(T? previous, T value), {void onError(Object error, StackTrace stackTrace)?, bool fireImmediately = false, void onDependencyMayHaveChanged()?}) → ProviderSubscription<T>
Listen to a provider and call listener whenever its value changes.
inherited
listenSelf(void listener(AsyncValue<T>? previous, AsyncValue<T> next), {void onError(Object error, StackTrace stackTrace)?}) → void
Listens to changes on the value exposed by this provider.
inherited
mayNeedDispose() → void
Life-cycle for when a listener is removed.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Notify dependents that this provider has changed.
inherited
onAddListener(void cb()) → void
A life-cycle for whenever a new listener is added to the provider.
inherited
onCancel(void cb()) → void
Add a listener to perform an operation when the last listener of the provider is removed.
inherited
onDispose(void listener()) → void
Adds a listener to perform an operation right before the provider is destroyed.
inherited
onRemoveListener(void cb()) → void
A life-cycle for whenever a listener is removed from the provider.
inherited
onResume(void cb()) → void
A life-cycle for when a provider is listened again after it was paused (and onCancel was triggered).
inherited
read<T>(ProviderListenable<T> provider) → T
Read the state associated with a provider, without listening to that provider.
inherited
readProviderElement<T>(ProviderBase<T> provider) → ProviderElementBase<T>
Reads the state of a provider, potentially creating it in the process.
inherited
readSelf() → AsyncValue<T>
Returns the currently exposed by a provider
inherited
refresh<T>(Refreshable<T> provider) → T
Forces a provider to re-evaluate its state immediately, and return the created value.
inherited
toString() → String
A string representation of this object.
inherited
updateShouldNotify(AsyncValue<T> previous, AsyncValue<T> next) → bool
Called when a provider is rebuilt. Used for providers to not notify their listeners if the exposed value did not change.
inherited
visitAncestors(void visitor(ProviderElementBase element)) → void
Visit the ProviderElementBases that this provider is listening to.
inherited
visitChildren({required void elementVisitor(ProviderElementBase element), required void notifierVisitor(ProxyElementValueNotifier element)}) → void
Visit the ProviderElements of providers that are listening to this element.
inherited
watch<T>(ProviderListenable<T> listenable) → T
Obtains the state of a provider and causes the state to be re-evaluated when that provider emits a new value.
inherited

Operators

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