firstWhereOrNull method
Finds the first element that satisfies the given condition, or null if none found
Implementation
T? firstWhereOrNull(bool Function(T element) test) {
for (var element in this) {
if (test(element)) return element;
}
return null;
}