nullIfEmpty method

Map<K, V>? nullIfEmpty()

Returns null if this map is empty.

Implementation

Map<K, V>? nullIfEmpty() => isEmpty ? null : this;