NullableListQueries<T> extension
Null-safe list helpers frequently used in collection workflows.
- on
-
- List<
T>
- List<
Properties
- firstOrNull → T?
-
Available on List<
ReturnsT> , provided by the NullableListQueries extensionnullinstead of throwing if the list is empty.no setter - lastOrNull → T?
-
Available on List<
ReturnsT> , provided by the NullableListQueries extensionnullinstead of throwing if the list is empty.no setter
Methods
-
elementAtOrNull(
int index) → T? -
Available on List<
Returns the element atT> , provided by the NullableListQueries extensionindexornullwhen out of bounds. -
firstWhereOrNull(
bool test(T element)) → T? -
Available on List<
Returns the first element matchingT> , provided by the NullableListQueries extensiontest, ornullwhen not found. -
lastWhereOrNull(
bool test(T element)) → T? -
Available on List<
Returns the last element matchingT> , provided by the NullableListQueries extensiontest, ornullwhen not found.