count method

int count(
  1. bool func(
    1. T e
    )
)

Return count of the given item

Implementation

int count(bool Function(T e) func) {
  return this.where((element) => func(element)).length;
}