ViewModelProvider<T extends ViewModel> class

ViewModel提供者

用于创建ViewModelViewModel配对使用, 对于同一个ViewModelStore有且仅有一次createViewModel调用, 即对于绑定的ViewModelStoreOwnerViewModelStore仅会创建唯一一个ViewModel实例

Constructors

ViewModelProvider()
const

Properties

hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

createViewModel() → T
创建一个T类型的ViewModel子类实例
@protected
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited