import 'package:json_annotation/json_annotation.dart'; part 'note_template.g.dart'; @JsonSerializable(fieldRename: FieldRename.snake) class NoteTemplateDTO { NoteTemplateDTO( {required this.language, required this.title, required this.note}); final String note; final String language; final String title; factory NoteTemplateDTO.fromJson(Map json) => _$NoteTemplateDTOFromJson(json); Map toJson() => _$NoteTemplateDTOToJson(this); }