AutoDisposeProviderElement<Created, Listened> class

Inheritance
Implemented types

Constructors

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

Properties

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

Methods

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

Operators

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