firstWhereOrNull method
Returns the first element matching the test, or null if none found
Implementation
T? firstWhereOrNull(bool Function(T element) test) {
for (final element in this) {
if (test(element)) return element;
}
return null;
}