lists library

Classes

Lists

Constants

emptyList → const List
const []

Functions

badArgument<T>({dynamic value, String name, String message}) → T
chopList<T>(Iterable<T> items) List<T>
compact<T>(Iterable<T> list) List<T>
compareBool<T>(bool toBool(T input)) Comparator<T>
convert<F, T>(F obj, {Transformer<F, T> converter, Predicate<F> predicate}) → T
createIf<T>(bool condition, Factory<T> factory) → T
distinctBy<T>(Iterable<T> list, dynamic by(T input)) Iterable<T>
filterKeys<K, V>(Map<K, V> source, bool filter(K key)) Map<K, V>
filterValues<K, V>(Map<K, V> source, bool filter(V value)) Map<K, V>
find<T>(Map<String, T> container, String id) → T
firstNonNull<T>([T a, T b, T c, T d, T e, T f]) → T
groupBy<K, V>(List<V> values, K mappedBy(V item)) Map<K, List<V>>
ifEmpty<T>(Iterable<T> list, {T then}) List<T>
mapExceptFirst<T>(Iterable<T> list, T map(T t)) List<T>
mapExceptLast<T>(Iterable<T> list, T map(T t)) List<T>
mapIndexed<R, T>(Iterable<T> input, R mapper(T item, int index)) Iterable<R>
mapOf<K, V>(Iterable<V> values, {K keyOf(V item)}) Map<K, V>
matchAll<T>() Predicate<T>
notNull<T>() Predicate<T>
notNullOrBlank() Predicate<String>
removeElement<T>(Iterable<T> elements, T toRemove) List<T>
sort<T>(Iterable<T> list, Comparator<T> comparator) Iterable<T>
toList<T>(dynamic value, DynTransformer<T> txr) List<T>
Converts a dynamic json value into a list, using the provided transformer to convert
toMap<T>(dynamic value, DynTransformer<T> txr) Map<String, T>
Converts a dynamic json value into a map, using the provided transformer to convert
widgetIf(bool condition, Factory<Widget> factory) Widget
wrongType<T>(String name, dynamic value, List<Type> accepted) → T

Typedefs

Predicate<T>(T input) bool