countWithoutNull method
- return the
length
withoutnull
elements
Implementation
int countWithoutNull() {
/// create a new list
final holder = List.from(this);
/// remove null elements
holder.removeWhere((element) => element == null);
/// return the holder elements count
return holder.length;
}