isExists method

bool isExists(
  1. bool test(
    1. T element
    )
)

Implementation

bool isExists(bool Function(T element) test) {
  try {
    return find(test) != null;
  } catch (e) {
    return false;
  }
}