firstOrNullWhere method
Returns the first element of the iterable which matches the selector, null if none matches the selector or the iterable is empty.
Implementation
TValue? firstOrNullWhere(bool Function(TValue) selector) {
return where(selector).firstOrNull;
}