NullableIterableFilteringExtensions<T> extension

on

Methods

elementAtOrNull(int index) → T?
Returns the indexth element or null.
exceptNull() Iterable<T>
Returns a new Iterable with all elements that are not null.
firstOrNull(bool test(T?)) → T?
Returns the first element or null.
lastOrNull(bool test(T?)) → T?
Returns the last element or null.
singleOrNull(bool test(T? element)) → T?
Filters this iterable with all elements that satisfy the predicate test. Throws a StateError if the filtered iterable contains more than one element. Otherwise returns the only remaining element or null.
whereNull() Iterable<T?>
Returns a new Iterable with all elements that are null.