AutoDisposeProviderBase<State> class
abstract
A base class for providers that destroy their state when no-longer listened.
See also:
- Provider.autoDispose, a variant of Provider that auto-dispose its state.
- Inheritance
-
- Object
- ProviderBase<
State> - AutoDisposeProviderBase
- Available extensions
Constructors
-
AutoDisposeProviderBase({required String? name, required Family<
dynamic, dynamic, ProviderBase> ? from, required Object? argument}) - A base class for providers that destroy their state when no-longer listened.
Properties
-
allTransitiveDependencies
→ List<
ProviderOrFamily> ? -
All the dependencies of a provider and their dependencies too.
latefinalinherited
- argument → Object?
-
If this provider was created with the
.family
modifier, argument is variable used.finalinherited -
dependencies
→ List<
ProviderOrFamily> ? -
The list of providers that this provider potentially depends on.
no setterinherited
-
from
→ Family<
dynamic, dynamic, ProviderBase> ? -
If this provider was created with the
.family
modifier, from is the.family
instance.finalinherited -
future
→ AutoDisposeProviderBase<
Future< State> > -
Available on AutoDisposeProviderBase<
Exposes aAsyncValue< , provided by the AutoDisposeAsyncProviderX extensionState> >Future
which resolves with the last value or error emitted.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- name → String?
-
A custom label for providers.
finalinherited
-
originProvider
→ ProviderBase<
Object?> -
The provider that will be refreshed when calling ProviderContainer.refresh
and that will be overridden when passed to
ProviderScope
.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stream
→ AutoDisposeProviderBase<
Stream< State> > -
Available on AutoDisposeProviderBase<
Exposes theAsyncValue< , provided by the AutoDisposeAsyncProviderX extensionState> >Stream
created by a StreamProvider.no setter
Methods
-
create(
covariant AutoDisposeRef ref) → State -
Initializes the state of a provider
override
-
createElement(
) → AutoDisposeProviderElementBase< State> -
An internal method that defines how a provider behaves.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
select<
Selected> (Selected selector(State value)) → ProviderListenable< Selected> -
Partially listen to a provider.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateShouldNotify(
State previousState, State newState) → bool -
Called when a provider is rebuilt. Used for providers to not notify their
listeners if the exposed value did not change.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited