nullIfEmpty property

Set<T>? get nullIfEmpty

Returns null if the Set is empty, otherwise returns the Set.

Implementation

Set<T>? get nullIfEmpty {
  return isEmpty ? null : this;
}