ViewModel class abstract
ViewModel
- Inheritance
-
- Object
- ViewModelBase
- ViewModel
- Mixed in types
Constructors
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< valueListenables, {required ValueWidgetBuilder<TValue> >Iterable< builder, Widget? child}) → WidgetTValue> > -
绑定到指定 ValueListenable 集合, 当
valueListenables
中 任一 ValueListenable 值发生变化时, 使用builder
构建 Widgetinherited -
$anyFor<
TValue> (Iterable< Object> prepertyKeys, {required ValueWidgetBuilder<Iterable< builder, Widget? child}) → WidgetTValue> > -
绑定到指定属性集合, 当任一
prepertyKeys
对应属性值发生变化时, 使用builder
构建 Widgetinherited -
$anyMap<
TValue> (Map< Object, ValueListenable< map, {required ValueWidgetBuilder<TValue> >Map< builder, Widget? child}) → WidgetObject, TValue> > -
绑定到指定 Map 键集合, 当
map
中任一 ValueListenable 值发生变化时, 使用builder
构建 Widgetinherited -
$anyMapFor<
TValue> (Map< Object, MapBehavior< prepertyKeyMap, {required ValueWidgetBuilder<TValue> ?>Map< builder, Widget? child}) → WidgetObject, TValue> > -
绑定到指定属性集合, 当任一
prepertyKeyMap
中对应的绑定属性值发生变化时, 使用builder
构建 Widgetinherited -
$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
构建 Widgetinherited -
$condFor<
TValue> (Object propertyKey, {ValueWidgetBuilder< TValue> ? $true, ValueWidgetBuilder<TValue> ? $false, Widget? child, bool valueHandle(TValue)?, TValue? initialValue}) → Widget -
绑定到指定属性, 当
propertyKey
对应属性值发生变化时, 若值判定结果为true
则使用$true
构建 Widget, 否则使用$false
构建 Widgetinherited -
$if<
TValue> (ValueListenable< TValue> valueListenable, {required ValueWidgetBuilder<TValue> builder, Widget? child, bool valueHandle(TValue)?}) → Widget -
绑定到指定 ValueListenable, 当
valueListenable
值发生变化时, 若值判定结果为true
则使用builder
构建 Widget, 否则不构建 Widgetinherited -
$ifFor<
TValue> (Object propertyKey, {required ValueWidgetBuilder< TValue> builder, Widget? child, bool valueHandle(TValue)?, TValue? initialValue}) → Widget -
绑定到指定属性, 当
propertyKey
对应属性值发生变化时, 若值判定结果为true
则使用builder
构建 Widget, 否则不构建 Widgetinherited -
$multi<
TValue> (Iterable< ValueListenable< valueListeneables, {required Widget builder(BuildContext context, TValue value, Widget? child, int index, ValueListenable<TValue> >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
选择器中提供的构建方法构建 Widgetinherited -
$switch<
TKey, TValue> (ValueListenable< TValue> valueListenable, {Map<TKey, ValueWidgetBuilder< ? options, ValueWidgetBuilder<TValue> >TValue> ? defalut, Widget? child, TKey valueToKey(TValue)?}) → Widget -
绑定到指定 ValueListenable, 当
valueListenable
值发生变化时, 其值做为key
到options
中查找对应 Widget 构建方法, 若未找到则使用default
构建, 如default
为null
则不构建 Widgetinherited -
$switchFor<
TKey, TValue> (Object propertyKey, {Map< TKey, ValueWidgetBuilder< ? options, ValueWidgetBuilder<TValue> >TValue> ? defalut, Widget? child, TKey valueToKey(TValue)?, TValue? initialValue}) → Widget -
绑定到指定属性, 当
propertyKey
对应属性值发生变化时, 其值做为key
到options
中查找对应 Widget 构建方法, 若未找到则使用default
构建, 如default
为null
则不构建 Widgetinherited -
$watch<
TValue> (ValueListenable< TValue> valueListenable, {required ValueWidgetBuilder<TValue> builder, Widget? child}) → Widget -
绑定到指定 ValueListenable, 当
valueListenable
值发生变化时, 使用builder
构建 Widgetinherited -
$watchFor<
TValue> (Object propertyKey, {required ValueWidgetBuilder< TValue> builder, Widget? child, TValue? initialValue}) → Widget -
绑定到指定属性, 当
propertyKey
对应属性值发生变化时, 使用builder
构建 Widgetinherited -
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 -
link(
Object propertyKey, {bool resetOnBefore = true}) → (void Function()?) -
获取指定
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