firstWhereOrNull method
- bool test(
- T element
The first element satisfying test
, or null
if there are none.
Implementation
T? firstWhereOrNull(bool Function(T element) test) {
for (var element in this) {
if (test(element)) return element;
}
return null;
}