MapExt<K, V> extension

Extension methods for generic maps.

on

Methods

getRandomListExcept({required int count, required List<K>? ignoreList, Random? random}) 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. Audited: 2026-06-12 11:26 EDT