ExtensionIterableE<E> extension

Utility extension methods for the native Iterable class.

on

Methods

all(bool test(E element)) bool

Available on Iterable<E>, provided by the ExtensionIterableE extension

Alias for Iterable.every.
builder<T>(T builder(E)) List<T>

Available on Iterable<E>, provided by the ExtensionIterableE extension

Iterable.map.toList()
containsAll(Iterable<E> other, {bool collapseDuplicates = true}) bool

Available on Iterable<E>, provided by the ExtensionIterableE extension

Returns true if every element in other also exists in this.
containsAny(Iterable<E> other) bool

Available on Iterable<E>, provided by the ExtensionIterableE extension

Returns true if this contains at least one element also contained in other.
firstOrNullWhere(bool predicate(E element)) → E?

Available on Iterable<E>, provided by the ExtensionIterableE extension

Returns the first element matching the given predicate, or null if no such element was found.
none(bool test(E element)) bool

Available on Iterable<E>, provided by the ExtensionIterableE extension

Returns true if no element of this satisfies test.
one(bool test(E element)) bool

Available on Iterable<E>, provided by the ExtensionIterableE extension

Returns true if there is exactly one element of this which satisfies test.
sum(num addend(E)) num

Available on Iterable<E>, provided by the ExtensionIterableE extension

Returns the sum of all the values in this iterable, as defined by addend.