copyMap method
Implementation
Map<String, dynamic> copyMap(Object? source) {
if (source == null) return <String, dynamic>{};
final copy = _copy(source);
if (copy is! Map<String, dynamic>) {
throw FormatException('$resource must be a JSON object.');
}
return copy;
}