toJson method
Implementation
Map<String, dynamic> toJson() {
final json = _$UserToJson(this);
// Add custom properties to the top level
json.addAll(customProperties ?? {});
// Remove the customProperties field from the result
json.remove('customProperties');
return json;
}