clone<K, V> method

Map<K, V> clone<K, V>()

Creates a deep copy of the Map, mutations to the original will not affect the copy.

Implementation

Map<K, V> clone<K, V>() {
  return map(
    (key, value) => MapEntry(_guardedCopyWith(key), _guardedCopyWith(value)),
  ).cast<K, V>();
}