remap method
Implementation
Map<K, V> remap((K key, V value)? Function(MapEntry<K, V>) remapper) {
Map<K, V> map = {};
for (MapEntry<K, V> entry in entries) {
(K key, V value)? newEntry = remapper(entry);
if (newEntry != null) {
map[newEntry.$1] = newEntry.$2;
}
}
return map;
}