NullableIterableExtensions<T> extension

on

Properties

firstOrNull → T?
Returns the first element.
no setter
isEmpty bool
Returns true if there are no elements in this collection.
no setter
isNotEmpty bool
Returns true if there is at least one element in this collection.
no setter
lastOrNull → T?
Returns the last element.
no setter
length int
Returns the number of elements in this.
no setter

Methods

contains(Object? element) bool
Whether the collection contains an element equal to element.
containsAll(Iterable<Object?> elements) bool
Returns true if all of the given elements is in the list.
containsAny(Iterable<Object?> elements) bool
Returns true if any of the given elements is in the list.
firstWhereOrNull(bool test(T item)) → T?
Returns the first value found by searching based on the condition specified in test.
setWhere<K extends Object>(Iterable<T> others, {required bool test(T original, T other), required K? apply(T original, T other), K? orElse(T original)?}) Iterable<K>
The data in the list of others is conditionally given to the current list.