ProviderElement<Created, Listened> class Null safety

An internal class that handles the state of a provider.

Do not use.

Implemented types


ProviderElement(ProviderBase<Created, Listened> _provider)
Do not use.


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


dispose() → void
Called on ProviderContainer.dispose.
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.
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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
notifyMayHaveChanged() → void
Notify that this provider may have changed. [...]
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. [...]
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. [...]