cloneMap<K, V> method
Return an untyped Map<K, dynamic> with values deep-cloned.
The returned map's values are cloned without attempting typed casts; use this when map values may be heterogeneous or contain nested plain maps.
Preserves the concrete Map implementation (e.g. LinkedHashMap,
HashMap, UnmodifiableMapView).
Implementation
@override
Map<K, dynamic> cloneMap<K, V>(Map<K, V> source) {
if (_nestIndex++ > nestLimit) {
throw LimitExceededException('Nest', _nestIndex);
}
final cloned = super.cloneMap<K, V>(source);
_nestIndex--;
return cloned;
}