ListCopyWith<Result, Elem, Copy> class abstract Copy-With

Interface used for Lists in chained copyWith methods All methods return a new modified list and do not modify the original list.

Constructors

ListCopyWith(List<Elem> value, ItemCopyWith<Copy, Elem, Result> item, Then<List<Elem>, Result> then)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

$update(List<Elem> transform(List<Elem>)) → Result
Applies any transformer function on the value
add(Elem v) → Result
Returns a new list with the item added to the end of the list
addAll(Iterable<Elem> v) → Result
Returns a new list with the items added to the end of the list
at(int index) → Copy
Access the copyWith interface for the item at index
insert(int index, Elem v) → Result
Returns a new list with the item inserted at index
insertAll(int index, Iterable<Elem> v) → Result
Returns a new list with the items inserted at index
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeAt(int index) → Result
Returns a new list without the item at index
replace(int index, Elem v) → Result
Returns a new list with the item at index replaced with a new value
skip(int count) → Result
Returns a new list without the first count items
splice(int index, int removeCount, [Iterable<Elem>? toInsert]) → Result
Returns a new spliced list with removeCount items removed and toInsert inserted at index
sublist(int start, [int? end]) → Result
Returns a new list with items at index start inclusive to end exclusive.
take(int count) → Result
Returns a new list with only the first count items
toString() String
A string representation of this object.
inherited
where(bool test(Elem)) → Result
Returns a filtered list with only the items the pass test

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) → Copy
Access the copyWith interface for the item at index