nullIfEmpty method

  1. @useResult
Map<K, V>? nullIfEmpty()

Returns this map, or null if it is empty.

Implementation

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