cloneMap<K, V> method
Clones a Map with dynamic values, enforcing nesting depth limit.
Throws LimitExceededException if the nesting limit is exceeded.
Implementation
@override
Map<K, dynamic> cloneMap<K, V>(Map<K, V> source) {
if (_nestIndex > nestLimit) {
throw LimitExceededException('depth', _nestIndex);
}
_nestIndex++;
try {
return super.cloneMap<K, V>(source);
} finally {
_nestIndex--;
}
}