IterableUtils<T> extension

on

Methods

all(TFuncPredicate1<T> funcPredicate) bool
asIterableOf<U extends T>() Iterable<U>
average<U extends num>([TFuncMapper<T, U>? funcMapper]) double
countIf(TFuncPredicate1<T> predicate) int
distinct() List<T>
each(FutureOr<void> func(T item, int idx)) FutureOr<void>
filterNull<U>([TFuncMapper<T, U?>? funcMapper]) Iterable<T>
firstOrNull([bool predicate(T item)?]) → T?
getBy(bool predicate(T)) → T
lastOrNull([bool predicate(T item)?]) → T?
mapToList<U>(TFuncMapper<T, U> funcMapper) List<U>
max<U extends num>(TFuncMapper<T, U> funcMapper) → U?
min<U extends num>(TFuncMapper<T, U> funcMapper) → U?
reduceTo<U>(TFuncReducer<T, U> funcReducer, U defaultValue) → U
selectMany<U>(TFuncMapper<T, Iterable<U>> funcMapper) Iterable<U>
singleOrNull() → T?
sortBy(TFuncMapper<T, dynamic> funcMapper, [bool descending = false]) List<T>
sortByNumeric(TFuncMapper<T, num> funcMapper, [bool descending = false]) List<T>
sortByNumericArray(TFuncMapper<T, List<num>> funcGetNumericArray, [bool isDescending = false]) List<T>
sortByString(TFuncMapper<T, String> funcMapper, [bool descending = false]) List<T>
sum<U extends num>([TFuncMapper<T, U>? funcMapper]) → U
toMap<K, U>({required K funcKey(T item)?, required U funcValue(T item)?}) Map<K, U>
tryGetBy(bool predicate(T)) → T?