ViewModelProvider class
Provides the ViewModel
present in the scope or creates one
You can acquire a ViewModelProvider
using BuildContext
context.viewModelProvider
Constructors
- ViewModelProvider(ViewModelStore viewModelStore, ViewModelFactory viewModelFactory)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- viewModelFactory ↔ ViewModelFactory
-
getter/setter pair
- viewModelStore ↔ ViewModelStore
-
getter/setter pair
Methods
-
get<
T extends ViewModel> ({String key = ""}) → T -
Returns the
ViewModel
present in the scope or creates one -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited