removeEmpty method

List<T> removeEmpty()

If the iterator value is empty, delete the element.

Implementation

List<T> removeEmpty() {
  final list = <T>[];
  for (final tmp in this) {
    if (tmp == null) {
      continue;
    }
    list.add(tmp);
  }
  return list;
}