countEmpty method

int countEmpty({
  1. bool trim = true,
})

return counter of empty elements in the iterable does not count the null values

Implementation

int countEmpty({bool trim = true}) => count(
      (e) => trim ? e.trim().isEmpty : e.isEmpty,
    );