ObservableList<T> class

Class that represents our list-type observable

Inheritance

Constructors

ObservableList({required List<T> value})
Constructor to init ObservableValue with value

Properties

first → T
get first item
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isEmpty bool
get if list is empty
no setter
isNotEmpty bool
get if list is not empty
no setter
last → T
get last item
no setter
lastValue List<T>?
Get las value of the observable
no setterinherited
length int
get size list
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setValueWithoutNotify List<T>
Method uses to set value without notify listeners
no getterinherited
value List<T>
Get current value of the observable
getter/setter pairinherited

Methods

add(T value) → void
add element in list and notify listeners
addAll(Iterable<T> value) → void
add element list in list and notify listeners
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
clear() → void
clear list and notify 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
indexOf(T element) int
use List.indexOf
indexWhere(bool test(T element), [int start = 0]) int
use List.indexWhere
insert(int index, T element) → void
insert element in the index
insertAll(int index, Iterable<T> iterable) → void
insert element list in the index
modify(ModifyValue<List<T>> modify) → void
user do modify value. recommended return new instance (use copyWith if is possible).
inherited
modifyItem(int index, T modify(T value)) → void
use to modify specific item in the list
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
remove(T value) → void
remove in list and notify listeners
removeAt(int index) → void
remove element by index in list and notify listeners
removeLast() → void
remove last element in list and notify listeners
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeRange(int start, int end) → void
remove element by range in list and notify listeners
removeWhere(bool test(T element)) → void
remove element in list and notify listeners
replaceRange(int start, int end, Iterable<T> replacement) → void
replace elements in list and notify listeners
toString() String
A string representation of this object.
inherited
update(List<T> value) → void
uses to update value
inherited

Operators

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