countWhere method

int countWhere(
  1. bool test(
    1. T
    )
)

Counts the elements for whichs the predicate holds.

See where.

Implementation

int countWhere(bool Function(T) test) {
  if (isNullOrEmpty) return 0;
  return this!.where(test).length;
}