cloneValue method

  1. @override
dynamic cloneValue(
  1. dynamic source
)
override

Wrapper for BaseCloner.cloneValue implementation with enforced size and nesting limits. Throws LimitExceededException if limits are exceeded.

Implementation

@override
dynamic cloneValue(dynamic source) {
  if (_cloneCounter++ > sizeLimit) {
    throw LimitExceededException('Clone', _cloneCounter);
  }
  return super.cloneValue(source);
}