IterableUtilExtensions<T> extension
Extension methods for the Iterable class.
- on
-
- Iterable<
T>
- Iterable<
Properties
- safeFirst → T?
-
Available on Iterable<
Returns the first element of the iterable if it is not empty, otherwise returns null.T> , provided by the IterableUtilExtensions extensionno setter - safeLast → T?
-
Available on Iterable<
Returns the last element of the iterable if it is not empty, otherwise returns null.T> , provided by the IterableUtilExtensions extensionno setter
Methods
-
byNameSafe(
String name) → T? -
Available on Iterable<
Returns the element with the given name if it is not empty, otherwise returns null.T> , provided by the IterableUtilExtensions extension -
exists(
T item, {EqualityChecker< T> ? equalityChecker}) → bool -
Available on Iterable<
Returns true if the item exists in the iterable, otherwise returns false.T> , provided by the IterableUtilExtensions extension -
safeAt(
int index) → T? -
Available on Iterable<
Returns the element at the given index if it is not empty, otherwise returns null.T> , provided by the IterableUtilExtensions extension