IterableExtension<T> extension

on

Methods

all(ConditionTester<T> test) bool

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

Checks whether all elements of this iterable satisfy test.
filter(ConditionTester<T> test) Iterable<T>

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

Filters elements based on a predicate (alias for where).
filterWhere(ConditionTester<T> test) Iterable<T>

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

Filters elements based on a predicate.
find(ConditionTester<T> test) → T?

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

Finds the first element that satisfies the given predicate.
findIndex(ConditionTester<T> test) int

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

Finds the index of the first element that satisfies the given predicate.
firstWhereOrNull(ConditionTester<T> test) → T?

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

Returns the first element that satisfies the predicate or null if none match.
flatMap<E>(Iterable<E> selector(T item)) Iterable<E>

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

Flattens lists of items into a single iterable.
flatten<E>(E? selector(T item)) Iterable<E>

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

Transforms each element of the iterable into zero or more elements of type E and flattens the results.
flattenIterable<E>(Iterable<E>? selector(T item)) Iterable<E>

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

Transforms each element of the iterable into zero or more results of type E, and flattens the resulting collections into a single iterable.
get([int index = 0]) → T

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

Returns the element at the specified index.
getFirst() → T

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

Returns the first element of the iterable.
getLast() → T

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

Returns the last element of the iterable.
group<K>(K keySelector(T item)) Map<K, List<T>>

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

Groups the elements of the iterable by a key returned from the keySelector function.
groupBy<K>(K keySelector(T item)) Map<K, List<T>>

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

Groups elements of this iterable into a Map using the given keySelector.
groupByAndMap<K, V>(K keySelector(T item), V valueSelector(T item)) Map<K, List<V>>

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

Groups elements of this iterable into a Map using keySelector, and applies valueSelector to each element before storing it.
indexWhereOrNull(ConditionTester<T> test) int?

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

Finds the index of an element that satisfies the predicate or returns null if not found.
isLengthBetween(int min, int max) bool

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

Checks if length of double value is BETWEEN minLength to max.
isLengthEqualTo(int other) bool

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

Checks if length of double value is EQUAL to max.
isLengthEt(int max) bool

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

Short form for isLengthEqualTo
isLengthGreaterThan(int max) bool

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

Checks if length of double value is GREATER than max.
isLengthGreaterThanOrEqualTo(int max) bool

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

Checks if length of double value is GREATER OR EQUAL to max.
isLengthGt(int max) bool

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

Short form for isLengthGreaterThan
isLengthGtEt(int max) bool

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

Short form for isLengthGreaterThanOrEqualTo
isLengthLessThan(int max) bool

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

Checks if length of double value is LESS than max.
isLengthLessThanOrEqualTo(int max) bool

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

Checks if length of double value is LESS OR EQUAL to max.
isLengthLt(int max) bool

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

Short form for isLengthLessThan
isLengthLtEt(int max) bool

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

Short form for isLengthLessThanOrEqualTo
lastWhereOrNull(ConditionTester<T> test) → T?

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

Returns the last element that satisfies the predicate or null if none match.
none(ConditionTester<T> test) bool

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

Checks if no element matches the predicate.
noneMatch(ConditionTester<T> test) bool

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

Checks if none of the elements match a condition using noneMatch.
process(dynamic action(T item)) → void

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

Processes each element of the iterable using the provided action function.
stream() GenericStream<T>

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

Converts the iterable to a stream.
toMap<K, V>(K keySelector(T item), V valueSelector(T item)) Map<K, V>

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

Maps the iterable to a new iterable using the provided mapper function.
whereOrNull(ConditionTester<T> test) Iterable<T>?

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

Returns an iterable with elements that match a condition, or null if none match.
whereType<U>() Iterable<T>

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

Filters elements of a specific type T.