ModelProvider<T extends Model> class
Provider for handling the Model class.
Basically, this is the same mechanism as ChangeNotifierProvider.
- Inheritance
-
- Object
- ProviderBase<
T, T> - RootProvider<
T, T> - AlwaysAliveProviderBase<
T, T> - ModelProvider
- Annotations
-
- @sealed
Constructors
-
ModelProvider(Create<
T, ProviderReference> create, {String? name}) - Provider for handling the Model class.
Properties
- argument → Object?
-
If this provider was created with the
.family
modifier, argument is variable used.no setterinherited - debugId ↔ String
-
A unique identifier for this provider, used by devtools to differentiate providers
latefinalinherited
-
from
→ Family<
dynamic, dynamic, dynamic, ProviderReference, RootProvider> ? -
If this provider was created with the
.family
modifier, from is the.family
instance.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- name → String?
-
A custom label for providers.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → ProviderElement< T, T> -
An internal method that defines how a provider behaves.
inherited
-
createState(
) → _ModelProviderState< T> -
An internal method that creates the state of a provider.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
overrideWithProvider(
AlwaysAliveProviderBase< T, T> provider) → ProviderOverride -
Overrides the behavior of this provider with another provider.
inherited
-
overrideWithValue(
T value) → Override -
Overrides the behavior of a provider with a value.
inherited
-
select<
Selected> (Selected selector(T value)) → ProviderListenable< Selected> -
Partially listen to a provider.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- autoDispose → const AutoDisposeModelProviderBuilder
- Builds a AutoDisposeModelProvider.
- family → const ModelProviderFamilyBuilder
- Builds a ModelProviderFamily.