firstWhereOrNull method

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

Implementation

T? firstWhereOrNull(bool Function(T) test) {
  try {
    return firstWhere(test);
  } on StateError {
    return null;
  }
}