AutoDisposeProviderElement<Created, Listened> class Null safety

The ProviderElement of an AutoDisposeProviderBase.

Implemented types


AutoDisposeProviderElement(ProviderBase<Created, Listened> provider)
The ProviderElement of an AutoDisposeProviderBase.


container ProviderContainer
The ProviderContainer that owns this ProviderElement.
read-only, inherited
dependents Set<ProviderElement>
All the ProviderElements that depend on this ProviderElement.
read-only, inherited
dirty bool
Whether a provider may need to be recomputed [...]
@protected, read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
hasListeners bool
Whether this ProviderElement is currently listened or not. [...]
read-only, inherited
maintainState bool
Whether to destroy the state of the provider when all listeners are removed or not. [...]
read / write, override
mounted bool
An utility to know if a provider was destroyed or not. [...]
read-only, inherited
origin ProviderBase<Created, Listened>
The provider associated to this ProviderElement, before applying overrides.
read-only, inherited
provider ProviderBase<Created, Listened>
The provider associated to this ProviderElement, after applying overrides.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
state → ProviderStateBase<Created, Listened>
final, inherited


dispose() → void
Called on ProviderContainer.dispose.
@mustCallSuper, @protected, inherited
flush() → void
Compute the provider (if it needs to be recomputed) and returns whether a new value was created or not.
getExposedValue() → Listened
Returns the currently exposed by a provider [...]
listen({void mayHaveChanged(ProviderSubscription<Listened> sub)?, void didChange(ProviderSubscription<Listened> sub)?}) ProviderSubscription<Listened>
Listen to this provider. [...]
markDidChange() → void
Notify that the state associated to this provider have changes. This will cause dependent widgets and providers to rebuild.
@protected, inherited
markMustRecomputeState() → void
Forces the state of a provider to be re-created, even if none of its dependencies changed.
mayNeedDispose() → void
Life-cycle for when a listener is removed. [...]
mount() → void
Called the first time a provider is obtained.
@mustCallSuper, @protected, inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
notifyMayHaveChanged() → void
Notify that this provider may have changed. [...]
@protected, inherited
onDispose(void listener()) → void
Adds a listener to perform an operation right before the provider is destroyed. [...]
read<T>(RootProvider<Object?, T> provider) → T
Read the state associated with a provider, without listening to that provider. [...]
toString() String
A string representation of this object. [...]
update(ProviderBase<Created, Listened> newProvider) → void
Called when the override of a provider changes. [...]
@mustCallSuper, @protected, inherited
watch<T>(ProviderBase<Object?, T> provider) → T
Obtains the state of a provider and cause the state to be re-evaluated when that provider emits a new value. [...]


operator ==(Object other) bool
The equality operator. [...]