ViewModel class abstract

ViewModel

Inheritance
Mixed in types

Constructors

ViewModel()

Properties

hashCode int
The hash code for this object.
no setterinherited
properties Iterable<MapEntry<Object, BindableProperty>>
获取所有已注册的属性
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

$any<TValue>(Iterable<ValueListenable<TValue>> valueListenables, {required ValueWidgetBuilder<Iterable<TValue>> builder, Widget? child}) Widget
绑定到指定 ValueListenable 集合, 当 valueListenables 中 任一 ValueListenable 值发生变化时, 使用 builder 构建 Widget
inherited
$anyFor<TValue>(Iterable<Object> prepertyKeys, {required ValueWidgetBuilder<Iterable<TValue>> builder, Widget? child}) Widget
绑定到指定属性集合, 当任一 prepertyKeys 对应属性值发生变化时, 使用 builder 构建 Widget
inherited
$anyMap<TValue>(Map<Object, ValueListenable<TValue>> map, {required ValueWidgetBuilder<Map<Object, TValue>> builder, Widget? child}) Widget
绑定到指定 Map 键集合, 当 map 中任一 ValueListenable 值发生变化时, 使用 builder 构建 Widget
inherited
$anyMapFor<TValue>(Map<Object, MapBehavior<TValue>?> prepertyKeyMap, {required ValueWidgetBuilder<Map<Object, TValue>> builder, Widget? child}) Widget
绑定到指定属性集合, 当任一 prepertyKeyMap 中对应的绑定属性值发生变化时, 使用 builder 构建 Widget
inherited
$build<TValue>(ValueListenable<TValue> valueListenable, {required ValueWidgetBuilder<TValue> builder, Widget? child}) Widget
构建 Widget
inherited
$buildOn<TValue>(ValueListenable<TValue> valueListenable, {required ValueWidgetBuilder<TValue> builder, required bool on(TValue value), Widget? child}) Widget
构建 Widget
inherited
$cond<TValue>(ValueListenable<TValue> valueListenable, {ValueWidgetBuilder<TValue>? $true, ValueWidgetBuilder<TValue>? $false, Widget? child, bool valueHandle(TValue)?}) Widget
绑定到指定 ValueListenable, 当 valueListenable 值发生变化时, 若值判定结果为 true 则使用 $true 构建 Widget, 否则使用 $false 构建 Widget
inherited
$condFor<TValue>(Object propertyKey, {ValueWidgetBuilder<TValue>? $true, ValueWidgetBuilder<TValue>? $false, Widget? child, bool valueHandle(TValue)?, TValue? initialValue}) Widget
绑定到指定属性, 当 propertyKey 对应属性值发生变化时, 若值判定结果为 true 则使用 $true 构建 Widget, 否则使用 $false 构建 Widget
inherited
$if<TValue>(ValueListenable<TValue> valueListenable, {required ValueWidgetBuilder<TValue> builder, Widget? child, bool valueHandle(TValue)?}) Widget
绑定到指定 ValueListenable, 当 valueListenable 值发生变化时, 若值判定结果为 true 则使用 builder 构建 Widget, 否则不构建 Widget
inherited
$ifFor<TValue>(Object propertyKey, {required ValueWidgetBuilder<TValue> builder, Widget? child, bool valueHandle(TValue)?, TValue? initialValue}) Widget
绑定到指定属性, 当 propertyKey 对应属性值发生变化时, 若值判定结果为 true 则使用 builder 构建 Widget, 否则不构建 Widget
inherited
$multi<TValue>(Iterable<ValueListenable<TValue>> valueListeneables, {required Widget builder(BuildContext context, TValue value, Widget? child, int index, ValueListenable<TValue> valueListeneable), Widget? childBuilder(int index)?}) List<Widget>
构建多个 Widget
inherited
$select<TValue>(ValueListenable<TValue> valueListenable, {required ValueWidgetBuilder<TValue>? selector(TValue), Widget? child}) Widget
绑定到指定 ValueListenable 当值发生变化时, 使用 selector 选择器中提供的构建方法构建 Widget
inherited
$switch<TKey, TValue>(ValueListenable<TValue> valueListenable, {Map<TKey, ValueWidgetBuilder<TValue>>? options, ValueWidgetBuilder<TValue>? defalut, Widget? child, TKey valueToKey(TValue)?}) Widget
绑定到指定 ValueListenable, 当 valueListenable 值发生变化时, 其值做为 keyoptions 中查找对应 Widget 构建方法, 若未找到则使用 default 构建, 如 defaultnull 则不构建 Widget
inherited
$switchFor<TKey, TValue>(Object propertyKey, {Map<TKey, ValueWidgetBuilder<TValue>>? options, ValueWidgetBuilder<TValue>? defalut, Widget? child, TKey valueToKey(TValue)?, TValue? initialValue}) Widget
绑定到指定属性, 当 propertyKey 对应属性值发生变化时, 其值做为 keyoptions 中查找对应 Widget 构建方法, 若未找到则使用 default 构建, 如 defaultnull 则不构建 Widget
inherited
$watch<TValue>(ValueListenable<TValue> valueListenable, {required ValueWidgetBuilder<TValue> builder, Widget? child}) Widget
绑定到指定 ValueListenable, 当 valueListenable 值发生变化时, 使用 builder 构建 Widget
inherited
$watchFor<TValue>(Object propertyKey, {required ValueWidgetBuilder<TValue> builder, Widget? child, TValue? initialValue}) Widget
绑定到指定属性, 当 propertyKey 对应属性值发生变化时, 使用 builder 构建 Widget
inherited
dispose() → void
dispose
inherited
ensureProperty<TValue>(Object propertyKey, {TValue? initialValue}) BindableProperty<TValue>
确认指定 propertyKey 对应的绑定属性
inherited
getInvoke(Object propertyKey, {bool resetOnBefore = true}) → (void Function()?)
获取指定 propertyKey 对应异步请求属性的请求发起方法
inherited
getProperties<TValue>(Iterable<Object> propertyKeys, {bool required = false}) Iterable<BindableProperty<TValue>?>
获取指定 propertyKeys 对应的属性集合
inherited
getProperty<TValue>(Object propertyKey, {bool required = false}) BindableProperty<TValue>?
获取指定 propertyKey 对应的属性
inherited
getPropertyOf<TValue, TProperty extends BindableProperty<TValue>>(Object propertyKey, {bool required = false}) → TProperty?
获取指定 propertyKey 对应 TProperty 类型属性
inherited
getValue<TValue>(Object propertyKey, {bool requiredProperty = false, TValue? defaultValue}) → TValue?
获取指定 propertyKey 对应的属性值
inherited
init() → void
inherited
invoke(Object propertyKey, {bool resetOnBefore = true}) → void
发起指定 propertyKey 对应的异步请求
inherited
获取指定 propertyKey 对应异步请求发起链接
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify(Object propertyKey, {bool requiredProperty = true}) → void
发送指定 propertyKey 对应的属性值变更通知
inherited
registerProperty<TValue>(Object propertyKey, BindableProperty<TValue> property) BindableProperty<TValue>
注册一个绑定属性
inherited
requireInvoke(Object propertyKey, {bool resetOnBefore = true}) → void Function()
获取指定 propertyKey 对应异步请求属性的请求发起方法
inherited
requireProperties<TValue>(Iterable<Object> propertyKeys) Iterable<BindableProperty<TValue>>
获取指定 propertyKeys 对应的属性集合
inherited
requireProperty<TValue>(Object propertyKey) BindableProperty<TValue>
获取指定 propertyKey 对应的属性
inherited
requirePropertyOf<TValue, TProperty extends BindableProperty<TValue>>(Object propertyKey) → TProperty
获取指定 propertyKey 对应 TProperty 类型属性
inherited
requireValue<TValue>(Object propertyKey) → TValue
获取指定 propertyKey 对应的属性值
inherited
setValue<TValue>(Object propertyKey, TValue value, {bool requiredProperty = true}) → void
设置指定 propertyKey 对应的属性值,
inherited
setValues(Iterable<Object> propertyKeys, Iterable<Object?> values, {bool requiredProperty = true}) → void
设置指定 propertyKeys 对应的属性值
inherited
toString() String
A string representation of this object.
inherited
updateValue<TValue>(Object propertyKey, TValue? updator(TValue), {bool requiredProperty = true}) → void
更新指定 propertyKey 对应的属性值
inherited

Operators

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