EmpireListProperty<T> class Null safety

An EmpireProperty with similar characteristics as a dart List<T>

Any change to the internal list will send a EmpireStateChanged event by default. This includes automatically triggering a UI rebuild.

Inheritance

Constructors

EmpireListProperty(List<T> value, EmpireViewModel viewModel, {String? propertyName})

Properties

hashCode int
The hash code for this object.
read-only, inherited
isEmpty bool
Whether this value has no elements.
read-only
isNotEmpty bool
Whether this value has no elements.
read-only
isNotNull bool
read-only, inherited
isNull bool
read-only, inherited
length int
The number of objects in this list.
read-only
originalValue List<T>
read-only, inherited
propertyName String?
read / write, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
value List<T>
read-only, inherited

Methods

add(T value, {bool notifyChanges = true}) → void
Adds value to the end of this list, extending the length by one.
addAll(Iterable<T> values, {bool notifyChanges = true}) → void
Appends all objects of values to the end of the list.
call(List<T> value, {bool notifyChange = true}) → void
inherited
clear({bool notifyChanges = true}) → void
Removes all objects from this list; the length of the list becomes zero.
contains(T value) bool
Whether the collection contains an element equal to value.
equals(dynamic other) bool
Checks if other is equal to the value of this EmpireProperty
inherited
forEach(void action(T)) → void
Invokes action on each element of this iterable in iteration order.
indexOf(T value, [int start = 0]) int
The first index of value in this list.
map<E>(E toElement(T)) Iterable<E>
The current elements of this iterable modified by toElement.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
remove(T value, {bool notifyChanges = true}) bool
Removes the first occurrence of value from this list.
removeAt(int index, {bool notifyChanges = true}) → T
Removes the object at position index from the list.
reset({bool notifyChange = true}) → void
Resets the value to what it was initialized with.
inherited
set(List<T> value, {bool notifyChange = true}) List<T>
Updates the property value. Notifies any listeners to the change
inherited
setOriginalValueToCurrent() → void
Updates the original value to what the current value of this property is.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator.
inherited
operator [](int index) → T