RxList<T> class
An observable list whose value is always unmodifiable.
Setting value compares element-by-element with the current list, so re-assigning an equal list does not rebuild watchers.
final items = RxList<String>([]);
items.value = ['a', 'b']; // replace
items.update((list) => [...list, 'c']); // derive a new list
items.value[0] = 'x'; // throws — the list is unmodifiable
- Inheritance
-
- Object
- ChangeNotifier
- RxList
- Implemented types
-
- ValueListenable<
List< T> >
- ValueListenable<
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.
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.
inherited
-
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 -
Always throws — see Rx.toString.
override
-
update(
Iterable< T> updateFn(Iterable<T> value)) → void - Derives a new list from the current one and always notifies listeners.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited