copy method

Map<String, Object?> copy()

Deep-copies a given json map

Implementation

Map<String, Object?> copy() {
  final copy = Map<String, Object?>.from(this);
  for (final entry in copy.entries) {
    copy[entry.key] = _copyValue(entry.value);
  }
  return copy;
}