singleWhereOrNull method

T? singleWhereOrNull(
  1. bool judgeFunc(
    1. T element
    )
)

Implementation

T? singleWhereOrNull(bool Function(T element) judgeFunc) {
  try {
    return singleWhere(judgeFunc);
  } catch (e) {
    return null;
  }
}