ListDelegateMixin<T> class abstract

Inheritance
Available extensions

Constructors

ListDelegateMixin()

Properties

delegate List<T>
no setter
first ↔ T
The first element.
getter/setter pairinherited
firstOrNull → T?

Available on Iterable<T>, provided by the IterableExtensions extension

The first element of this iterator, or null if the iterable is empty.
no setter
firstOrNull → V?

Available on Iterable<V>?, provided by the SunnyIterableExtensions extension

no setter
hashCode int
The hash code for this object.
no setterinherited
indexed Iterable<(int, T)>

Available on Iterable<T>, provided by the IterableExtensions extension

Pairs of elements of the indices and elements of this iterable.
no setter
isEmpty bool
Whether this collection has no elements.
no setterinherited
isNotEmpty bool
Whether this collection has at least one element.
no setterinherited
isNotNullOrEmpty bool

Available on Iterable<V>?, provided by the SunnyIterableExtensions extension

no setter
isNullOrEmpty bool

Available on Iterable<V>?, provided by the SunnyIterableExtensions extension

no setter
iterable Iterable<T>

Available on List<T>, provided by the CoreListExtension extension

no setter
iterator Iterator<T>
A new Iterator that allows iterating the elements of this Iterable.
no setteroverride
last ↔ T
The last element.
getter/setter pairinherited
lastIndex int

Available on List<T>, provided by the CoreListExtension extension

no setter
lastOrNull → T?

Available on Iterable<T>, provided by the IterableExtensions extension

The last element of this iterable, or null if the iterable is empty.
no setter
length int
The number of objects in this list.
getter/setter pairoverride
nonNulls Iterable<T>

Available on Iterable<T?>, provided by the NullableIterableExtensions extension

The non-null elements of this iterable.
no setter
orLength int

Available on Iterable<V>?, provided by the NullIterXX extension

no setter
reversed Iterable<T>
An Iterable of the objects in this list in reverse order.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
single → T
Checks that this iterable has only one element, and returns that element.
no setterinherited
singleOrNull → T?

Available on Iterable<T>, provided by the IterableExtensions extension

The single element of this iterator, or null.
no setter
toJS JSArray<T>

Available on List<T>, provided by the ListToJSArray extension

Converts this List to a JSArray by either casting, unwrapping, or cloning the List.
no setter
toJSProxyOrRef JSArray<T>

Available on List<T>, provided by the ListToJSArray extension

Converts this List to a JSArray by either casting, unwrapping, or proxying the List.
no setter
tryFirst → V?

Available on Iterable<V>?, provided by the NullIterXX extension

no setter
wait Future<List<T>>

Available on Iterable<Future<T>>, provided by the FutureIterable extension

Waits for futures in parallel.
no setter

Methods

add(T element) → void
Adds value to the end of this list, extending the length by one.
inherited
addAll(Iterable<T> iterable) → void
Appends all objects of iterable to the end of this list.
inherited
any(bool test(T element)) bool
Checks whether any element of this iterable satisfies test.
inherited
asMap() Map<int, T>
An unmodifiable Map view of this list.
inherited
asNameMap() Map<String, T>

Available on Iterable<T>, provided by the EnumByName extension

Creates a map from the names of enum values to the values.
awaitAll({bool eagerError = true}) Future<List<T>>

Available on Iterable<FutureOr<T>>, provided by the FutureOrIterableExt extension

byName(String name) → T

Available on Iterable<T>, provided by the EnumByName extension

Finds the enum value in this list with name name.
cast<R>() List<R>
Returns a view of this list as a list of R instances.
inherited
chop([int num = 1]) List<T>

Available on List<T>, provided by the CoreListExtension extension

chunkedStream(int chunkSize) Stream<List<T>>

Available on List<T>, provided by the CoreListExtension extension

clear() → void
Removes all objects from this list; the length of the list becomes zero.
inherited
completed() List<T>

Available on Iterable<FutureOr<T>>?, provided by the FutureOrIterableNullExt extension

contains(Object? element) bool
Whether the collection contains an element equal to element.
inherited
elementAt(int index) → T
Returns the indexth element.
inherited
elementAtOrNull(int index) → T?

Available on Iterable<T>, provided by the IterableExtensions extension

The element at position index of this iterable, or null.
embedded(JsonPath basePath) List<ValidationError>

Available on List<ValidationError>, provided by the ErrorList extension

end(int index) → T

Available on List<T>, provided by the CoreListExtension extension

every(bool test(T element)) bool
Checks whether every element of this iterable satisfies test.
inherited
expand<T>(Iterable<T> f(T element)) Iterable<T>
Expands each element of this Iterable into zero or more elements.
inherited
expandIndexed<R>(Iterable<R> mapper(T item, int index)) List<R>

Available on Iterable<T>, provided by the IterDynXX extension

fillRange(int start, int end, [T? fill]) → void
Overwrites a range of elements with fillValue.
inherited
firstOr([T? ifEmpty]) → T?

Available on Iterable<T>, provided by the IterDynXX extension

firstOrNull([bool filter(T item)?]) → T?

Available on List<T>, provided by the CoreListExtension extension

firstWhere(bool test(T element), {T orElse()?}) → T
The first element that satisfies the given predicate test.
inherited
flatten() List<V>

Available on Iterable<Iterable<V>>, provided by the IterIterXX extension

fold<T>(T initialValue, T combine(T previousValue, T element)) → T
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value
inherited
followedBy(Iterable<T> other) Iterable<T>
Creates the lazy concatenation of this iterable and other.
inherited
forEach(void action(T element)) → void
Invokes action on each element of this iterable in iteration order.
inherited
forEachAsync(FutureOr onEach(T item)) Future

Available on Iterable<T>, provided by the IterDynXX extension

forEachIndexed<R>(R mapper(T item, int index)) → void

Available on Iterable<T>, provided by the IterDynXX extension

freeze() List<T>

Available on Iterable<T>, provided by the IterDynXX extension

get(int index) → T?

Available on List<T>, provided by the CoreListExtension extension

getRange(int start, int end) Iterable<T>
Creates an Iterable that iterates over a range of elements.
inherited
groupBy<K>(K keyOf(V value)) Map<K, List<V>>

Available on Iterable<V>?, provided by the SunnyIterableExtensions extension

groupByKey() Map<K, List<V>>

Available on Iterable<MapEntry<K, V>>, provided by the IterMapEntryXX extension

groupByType() Map<Type, List<V>>

Available on Iterable<V>?, provided by the SunnyIterableExtensions extension

Available on List<T>, provided by the CoreListExtension extension

ifEmpty(Getter<Iterable<V>> other) Iterable<V>

Available on Iterable<V>?, provided by the SunnyIterableExtensions extension

indexed() Iterable<ListIndex<T>>

Available on Iterable<T>, provided by the IterDynXX extension

indexOf(Object? element, [int start = 0]) int
The first index of element in this list.
inherited
indexWhere(bool test(T element), [int start = 0]) int
The first index in the list that satisfies the provided test.
inherited
insert(int index, T element) → void
Inserts element at position index in this list.
inherited
insertAll(int index, Iterable<T> iterable) → void
Inserts all objects of iterable at position index in this list.
inherited
join([String separator = ""]) String
Converts each element to a String and concatenates the strings.
inherited
joinWithAnd([String? formatter(T input)?]) String

Available on Iterable<T>, provided by the IterDynXX extension

keyed<K>(K keyOf(V value)) Map<K, V>

Available on Iterable<V>?, provided by the SunnyIterableExtensions extension

lastIndexOf(Object? element, [int? start]) int
The last index of element in this list.
inherited
lastIndexWhere(bool test(T element), [int? start]) int
The last index in the list that satisfies the provided test.
inherited
lastOr([T? ifEmpty]) → T?

Available on Iterable<T>, provided by the IterDynXX extension

lastOrNull({bool filter(T item)?}) → T?

Available on List<T>?, provided by the CoreListNullableExtension extension

lastWhere(bool test(T element), {T orElse()?}) → T
The last element that satisfies the given predicate test.
inherited
map<T>(T f(T element)) Iterable<T>
The current elements of this iterable modified by toElement.
inherited
mapIndexed<R>(R mapper(T item, int index)) List<R>

Available on Iterable<T>, provided by the IterDynXX extension

mapNotNull<R extends Object>(R? mapper(V from)) List<R>

Available on Iterable<V?>, provided by the IterOfNullableXX extension

mapPos<R>(R mapper(T item, IterationPosition pos)) Iterable<R>

Available on Iterable<T>, provided by the IterDynXX extension

mapPosIndex<R>(R mapper(T item, int index, IterationPosition pos)) Iterable<R>

Available on Iterable<T>, provided by the IterDynXX extension

mapToString() Iterable<String>

Available on Iterable<V>?, provided by the SunnyIterableExtensions extension

max([T? ifNull]) → T

Available on Iterable<T>, provided by the ComparableIterXX extension

maxBy<R extends Comparable<R>>(R by(T item), [T? ifNull]) → T

Available on Iterable<T>, provided by the IterDynXX extension

maxByOrNull<R extends Comparable<R>>(R by(T item), [T? ifNull]) → T?

Available on Iterable<T>, provided by the IterDynXX extension

maxOrNull([T? ifNull]) → T?

Available on Iterable<T>, provided by the ComparableIterXX extension

min([T? ifNull]) → T

Available on Iterable<T>, provided by the ComparableIterXX extension

minBy<R extends Comparable<R>>(R by(T item), [T? ifNull]) → T

Available on Iterable<T>, provided by the IterDynXX extension

minByOrNull<R extends Comparable<R>>(R by(T item), [T? ifNull]) → T?

Available on Iterable<T>, provided by the IterDynXX extension

minOrNull([T? ifNull]) → T?

Available on Iterable<T>, provided by the ComparableIterXX extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notNull() Iterable<V>

Available on Iterable<V?>, provided by the IterOfNullableXX extension

notNullList() List<V>

Available on Iterable<V?>, provided by the IterOfNullableXX extension

notNullSet() Set<V>

Available on Iterable<V?>, provided by the IterOfNullableXX extension

orContains(V other) bool

Available on Iterable<V>?, provided by the NullIterXX extension

orEmpty() Iterable<V>

Available on Iterable<V>?, provided by the SunnyIterableExtensions extension

orEmptyIter() Iterable<V>

Available on Iterable<V>?, provided by the NullIterXX extension

orEmptyList() List<V>

Available on List<V>?, provided by the NullListXX extension

orMap<R>(R mapper(dynamic V)) Iterable<R>

Available on Iterable<V>?, provided by the NullIterXX extension

orWhere(bool predicate(V v)) Iterable<V>

Available on Iterable<V>?, provided by the NullIterXX extension

random() → T

Available on Iterable<T>, provided by the IterDynXX extension

randomOrNull() → T?

Available on Iterable<T>, provided by the IterDynXX extension

reduce(T combine(T previousValue, T element)) → T
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.
inherited
remove(Object? element) bool
Removes the first occurrence of value from this list.
inherited
removeAt(int index) → T
Removes the object at position index from this list.
inherited
removeLast() → T
Removes and returns the last object in this list.
inherited
removeLastWhere({bool removeIf(T item)?, T? removeItem}) bool

Available on List<T>?, provided by the CoreListNullableExtension extension

removeRange(int start, int end) → void
Removes a range of elements from the list.
inherited
removeWhere(bool test(T element)) → void
Removes all objects from this list that satisfy test.
inherited
replaceRange(int start, int end, Iterable<T> newContents) → void
Replaces a range of elements with the elements of replacements.
inherited
retainWhere(bool test(T element)) → void
Removes all objects from this list that fail to satisfy test.
inherited
safeRemove(int index) → T?

Available on List<T>, provided by the CoreListExtension extension

setAll(int index, Iterable<T> iterable) → void
Overwrites elements with the objects of iterable.
inherited
setRange(int start, int end, Iterable<T> iterable, [int skipCount = 0]) → void
Writes some elements of iterable into a range of this list.
inherited
sha256() → Digest

Available on List<int>, provided by the IntList extension

sha256Hex() String

Available on List<int>, provided by the IntList extension

shuffle([Random? random]) → void
Shuffles the elements of this list randomly.
inherited
singleOrNull() → T?

Available on List<T>, provided by the CoreListExtension extension

singleWhere(bool test(T element), {T orElse()?}) → T
The single element that satisfies test.
inherited
skip(int count) Iterable<T>
Creates an Iterable that provides all but the first count elements.
inherited
skipWhile(bool test(T element)) Iterable<T>
Creates an Iterable that skips leading elements while test is satisfied.
inherited
sort([int compare(T a, T b)?]) → void
Sorts this list according to the order specified by the compare function.
inherited
sorted() List<T>

Available on Iterable<T>, provided by the ComparableIterXX extension

sortedBy([Comparator<T>? compare]) List<T>

Available on Iterable<T>, provided by the IterDynXX extension

sortedUsing(Comparable getter(T item)) List<T>

Available on Iterable<T>, provided by the IterDynXX extension

sublist(int start, [int? end]) List<T>
Returns a new list containing the elements between start and end.
inherited
sum() double

Available on Iterable<num>?, provided by the IterOfNumNullableXX extension

sumBy(double toDouble(T t)) double

Available on Iterable<T>, provided by the IterDynXX extension

sumByInt(int toDouble(T t)) int

Available on Iterable<T>, provided by the IterDynXX extension

sumDouble() double

Available on Iterable<num>?, provided by the IterOfNumNullableXX extension

sumInt() int

Available on Iterable<num>?, provided by the IterOfNumNullableXX extension

tail([int i = 1]) List<T>

Available on List<T>, provided by the CoreListExtension extension

take(int count) Iterable<T>
Creates a lazy iterable of the count first elements of this iterable.
inherited
takeWhile(bool test(T element)) Iterable<T>
Creates a lazy iterable of the leading elements satisfying test.
inherited
toList({bool growable = true}) List<T>
Creates a List containing the elements of this Iterable.
inherited
toLowerCase() Iterable<String>

Available on Iterable<String>, provided by the ListStringXX extension

toMap() Map<K, V>

Available on Iterable<MapEntry<K, V>>, provided by the IterMapEntryXX extension

toSet() Set<T>
Creates a Set containing the same elements as this iterable.
inherited
toStream() Stream<T>

Available on Iterable<T>, provided by the IterDynXX extension

toString() String
A string representation of this object.
inherited
truncate([int? length]) List<T>

Available on Iterable<T>, provided by the IterDynXX extension

tryEnd(int index) → T?

Available on List<T>, provided by the CoreListExtension extension

tryGet(int index) → T?

Available on List<T>, provided by the CoreListExtension extension

tryGet(int index) → V?

Available on List<V>?, provided by the NullListXX extension

tryRemove(int index) → T?

Available on List<T>, provided by the CoreListExtension extension

trySublist(int startIndex, int endIndex) List<T>

Available on List<T>, provided by the CoreListExtension extension

uniqueBy(dynamic uniqueProp(T item)) Iterable<T>

Available on Iterable<T>, provided by the IterDynXX extension

updateWhere(bool predicate(T check), dynamic mutate(T input)) List<T>

Available on List<T>, provided by the CoreListExtension extension

waitAll({bool eagerError = true}) Future<List<T>>

Available on Iterable<Future<T>>, provided by the FutureIterableExt extension

where(bool test(T element)) Iterable<T>
Creates a new lazy Iterable with all elements that satisfy the predicate test.
inherited
whereIndexed([bool filter(T item)?]) Iterable<ListIndex<T>>

Available on List<T>?, provided by the CoreListNullableExtension extension

whereNotBlank() List<String>

Available on Iterable<String>, provided by the ListStringXX extension

whereNotNull() Iterable<V>

Available on Iterable<V>?, provided by the SunnyIterableExtensions extension

whereType<T>() Iterable<T>
Creates a new lazy Iterable with all elements that have type T.
inherited
whereValuesNotNull() Iterable<MapEntry<K, V>>

Available on Iterable<MapEntry<K, V>>, provided by the IterableEntryExtensions extension

Operators

operator *(dynamic item) List<T>

Available on List<T>, provided by the CoreListExtension extension

The existing List + operator only works for lists, so *= is the best we can do
operator +(List<T> other) List<T>
Returns the concatenation of this list and other.
inherited
operator +(dynamic item) Iterable<T?>

Available on Iterable<T?>, provided by the SunnyIterableExtensionExt extension

No way to override the + operator for an iterable, so I use a downcast to iterable
operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) → T
The object at the given index in the list.
override
operator []=(int index, T value) → void
Sets the value at the given index in the list to value.
override