firstWhereOrNull method
Returns the first element that satisfies the given test, or null if
there is none.
Implementation
V? firstWhereOrNull(bool Function(V element) where) {
try {
return values.firstWhere(where);
} catch (e) {
return null;
}
}