firstWhereOrNull method

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

Implementation

E? firstWhereOrNull(bool Function(E) test) {
  try {
    return firstWhere(test);
  } catch (e) {
    return null;
  }
}