MapExt<K, V> extension

Extension methods for generic maps.

on

Methods

getRandomListExcept({required int count, required List<K>? ignoreList}) List<MapEntry<K, V>>?

Available on Map<K, V>, provided by the MapExt extension

Returns up to count random entries from this map, excluding any keys present in ignoreList.
nullIfEmpty() Map<K, V>?

Available on Map<K, V>, provided by the MapExt extension

Returns this map, or null if it is empty.