ActiveList<T> class
An ActiveList with similar characteristics as a an ordinary dart List object. When an update is done an ActiveStateChanged event is triggered which in-turn makes a UI rebuild of that widget.
Has similar characteristics as int and The value cannot be null
- Inheritance
-
- Object
- ActiveType<
List< T> > - ActiveList
Constructors
-
ActiveList.new(List<
T> value, {String? typeName}) - ActiveList.empty({String? typeName})
-
Factory constructor for initializing an ActiveList to an empty List.
factory
Properties
- activeController → ActiveController
-
Returns the instance of the ActiveController this
property is associated with.
no setterinherited
- first → T
-
Returns the first element.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
Whether this value has no elements.
no setter
- isNotEmpty → bool
-
Whether this value has no elements.
no setter
- isNotNull → bool
-
Returns true if the value of
this
is not null.no setterinherited - isNull → bool
-
Returns true if the value of
this
is null.no setterinherited - last → T
-
Returns the last element.
no setter
- length → int
-
The number of objects in this list.
no setter
-
mockValue
→ List<
T> -
no setterinherited
-
originalValue
→ List<
T> -
no setterinherited
-
reversed
→ List<
T> -
A List of the objects in this list in reverse order.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- single → T
-
Checks that this has only one element, and returns that element.
no setter
- typeName ↔ String?
-
getter/setter pairinherited
-
value
→ List<
T> -
no setterinherited
Methods
-
add(
T value, {bool notifyActivities = true}) → void -
Adds
value
to the end of this list, extending the length by one. -
addAll(
Iterable< T> values, {bool notifyActivities = true}) → void -
Appends all objects of
values
to the end of the list. -
call(
List< T> value, {bool notifyChange = true, bool setAsOriginal = false}) → void -
Updates the underlying
value
for this ActiveType.inherited -
clear(
{bool notifyActivities = 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
. -
elementAt(
int index) → T -
Returns the
index
th element. -
equals(
dynamic other) → bool -
Checks if
other
is equal to the value of this ActiveTypeinherited -
firstWhere(
bool test(T element), {T orElse()?}) → T -
Returns the first element that satisfies the given predicate
test
. -
firstWhereOrNull(
bool test(T element)) → T? -
Returns the first element that satisfies the given predicate
test
. -
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. -
indexWhere(
bool test(T element), [int start = 0]) → int -
The first index in the list that satisfies the provided
test
. -
map<
E> (E toElement(T)) → Iterable< E> -
The current elements of this iterable modified by
toElement
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
T value, {bool notifyActivities = true}) → bool -
Removes the first occurrence of
value
from this list. -
removeAt(
int index, {bool notifyActivities = true}) → T -
Removes the object at position
index
from the list. -
reset(
{bool notifyChange = true}) → void -
Resets the value to the originalValue.
inherited
-
set(
List< T> value, {bool notifyChange = true, bool setAsOriginal = false}) → List<T> -
Updates the property value. Notifies any listeners to the change
inherited
-
setActiveController(
ActiveController activeController) → void -
Links this ActiveType instance with an ActiveController.
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
-
where(
bool test(T element)) → List< T> -
Returns a new List with all elements that satisfy the
predicate
test
.
Operators
-
operator ==(
dynamic other) → bool -
The equality operator.
inherited
-
operator [](
int index) → T -
The object at the given
index
in the list.