ListValueNotifier<T> class

A ChangeNotifier that holds a list of data.

This class also exposes methods to interact with the data. By default, listeners are notified whenever the data is modified, but notifying can be optionally disabled.

Inheritance
Implemented types

Constructors

ListValueNotifier(List<T> rawList)
Creates a ListValueNotifier that wraps this value _rawList.

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
last ← T
no getter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value List<T>
no setteroverride

Methods

add(T element) → void
Adds an element to the list and notifies listeners.
addAll(Iterable<T> elements) → void
Adds elements to the list and notifies listeners.
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
clear() → void
Clears the list and notifies listeners.
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
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
override
remove(T value) bool
Removes the first occurrence of value from this list.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
replaceAll(Iterable<T> elements) → void
Replaces all elements in the list and notifies listeners. It's preferred to calling .clear() then .addAll(), because it only notifies listeners once.
toString() String
A string representation of this object.
inherited
trimToSublist(int start, [int? end]) → void
Truncates to just the elements between start and end.

Operators

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