whereNotNull method

  1. @Deprecated('Use .nonNulls instead.')
Iterable<T> whereNotNull()

The non-null elements of this Iterable.

Returns an iterable which emits all the non-null elements of this iterable, in their original iteration order.

For an Iterable<X?>, this method is equivalent to .whereType<X>().

Implementation

@Deprecated('Use .nonNulls instead.')
Iterable<T> whereNotNull() sync* {
  for (var element in this) {
    if (element != null) yield element;
  }
}