MultiValueNotifier<T> class

多个相同值监听。

如像监听同一控件的2级或者多级状态变更时使用次控件。

关于更新其中一个值的时候。

  • 使用方法更新
 MultiValueNotifier.indexValue(index, value);
  • 使用运算符
 MultiValueNotifier[index] = value;

!!! 注意 !!!

切勿使用value的GET方法获取更新

Inheritance
Implemented types

Constructors

MultiValueNotifier(List<T> _value)

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 List<T>
The current value of the object. When the value changes, the callbacks registered with addListener will be invoked.
getter/setter pairoverride-getter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
indexValue(T newValue, int index) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
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.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) → T
operator []=(int index, T newValue) → void