copy<K, V> static method
Copies the given map (source
) to the destination (dest
).
Implementation
static Map<K, V?> copy<K, V>(Map<K, V?> source, Map<K, V?> dest,
[bool filter(K key, V? value)?]) {
for (final key in source.keys) {
final value = source[key];
if (filter != null && filter(key, value))
dest[key] = value;
}
return dest;
}