find method

T? find(
  1. bool predicate(
    1. T
    )
)

Returns the first element matching the given predicate, or null if no such element was found.

Implementation

T? find(bool Function(T) predicate) {
  return firstOrNull(predicate);
}