IterableExtensions<T> extension

on

Methods

firstOrDefault([bool test(T element)?]) → T?

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

get the first item that match expression or null if not any
indexedForEach(void f(int index, T element)) → void

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

loop items with index and element arguments
indexedMap<E>(E f(int index, T e)) Iterable<E>

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

map elements with index and return new map
lastOrDefault([bool test(T element)?]) → T?

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

get the last item that match expression or null if not any
removeDuplicates([bool compare(T a, T b)?]) List<T>

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

Return a new list without duplicated elements you can use .toSet().toList() but the order may not be the same