firstWhereOrNull method

E? firstWhereOrNull(
  1. bool test(
    1. E
    )
)

Implementation

E? firstWhereOrNull(bool Function(E) test) {
  for (var element in this) {
    if (test(element)) {
      return element;
    }
  }
  return null;
}