firstOrNullWhere method

TValue? firstOrNullWhere(
  1. bool selector(
    1. TValue
    )
)

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;
}