nullIfEmpty property

Iterable<E>? nullIfEmpty

returns null or if it is empty returns true.

Implementation

Iterable<E>? get nullIfEmpty => isEmpty ? null : this;