firstOrNullWhere method

T? firstOrNullWhere(
  1. bool test(
    1. T element
    )
)

Returns the first element that satisfies the given predicate test.

Iterates through elements and returns the first to satisfy test.

If no element satisfies test, the result of invoking is null.

Implementation

T? firstOrNullWhere(bool test(T element)) => this.firstWhereOrNull(test);