import 'package:json_annotation/json_annotation.dart'; part 'contact_person.g.dart'; @JsonSerializable(fieldRename: FieldRename.snake) class ContactPersonDTO { ContactPersonDTO( {required this.name, required this.salutation, required this.phoneNo, required this.mobileNo}); String name; String salutation; String phoneNo; String mobileNo; factory ContactPersonDTO.fromJson(Map json) => _$ContactPersonDTOFromJson(json); Map toJson() => _$ContactPersonDTOToJson(this); }