TransformBindableProperty<S, T> class

具有转换功能的绑定属性

Inheritance

Constructors

TransformBindableProperty(ValueListenable<S> source, {required T? transformer(S), required T initial, PropertyValueChanged<T>? valueChanged})
创建一个具有转换功能的绑定属性,该绑定属性监视 source 的值变化,当 source 值发生变化时使用 transformer 对值进行转换, 如转换结果非 null,则将结果值写入属性(可能会触发 notify)

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T
The current value of the object. When the value changes, the callbacks registered with addListener will be invoked.
no setteroverride

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
dispose
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify() → void
发送通知
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() String
A string representation of this object.
inherited
transform<T>({required T? transformer(T), required T initial, PropertyValueChanged<T>? valueChanged}) BindableProperty<T>
从当前绑定属性转换到一个新的绑定属性
inherited

Operators

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