setValue<TValue> method
设置指定 propertyKey
对应的属性值,
propertyKey
对应的绑定属性 BindableProperty 必须继承自 WriteableBindableProperty
propertyKey
属性键
value
指定属性值
requiredProperty
指定 propertyKey
对应属性是否必须存在,
其值为 true
时, 如 propertyKey
对应属性不存在则抛出异常
默认值为 true
Implementation
void setValue<TValue>(Object propertyKey, TValue value,
{bool requiredProperty = true}) =>
getPropertyOf<TValue, WriteableBindableProperty<TValue>>(propertyKey,
required: requiredProperty)
?.value = value;