IterableExtensions<T> extension

on

Properties

firstOrNull → T?

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

Returns the first element.
no setter
lastOrNull → T?

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

Returns the last element.
no setter

Methods

containsAll(Iterable<Object?> elements) bool

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

Returns true if all of the given elements is in the list.
containsAny(Iterable<Object?> elements) bool

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

Returns true if any of the given elements is in the list.
distinct() List<T>

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

Remove duplicate values from the list.
expandAndRemoveEmpty<TCast>(Iterable<TCast?> callback(T item)) List<TCast>

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

After replacing the data in the list through callback, delete the Null.
firstWhereOrNull(bool test(T item)) → T?

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

Returns the first value found by searching based on the condition specified in test.
index(T callback(T item, int index)) Iterable<T>

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

Index and loop it through callback.
limit(int start, int end) List<T>

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

Extract an array with a given range between start and end.
limitEnd(int end) List<T>

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

Extract an array with a given range at end.
limitStart(int start) List<T>

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

Extract an array with a given range at start.
mapAndRemoveEmpty<TCast>(TCast? callback(T item)) List<TCast>

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

After replacing the data in the list, delete the null.
setWhere<K extends Object>(Iterable<T> others, {required bool test(T original, T other), required K? apply(T original, T other), K? orElse(T original)?}) Iterable<K>

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

The data in the list of others is conditionally given to the current list.
split(int length) Iterable<Iterable<T>>

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

Divides the array by the specified length into an array.
toMap<K, V>({K key(dynamic e)?, V value(dynamic e)?}) Map<K, V>

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

Creates a Map instance in which the keys and values are computed from the iterable.