import 'package:json_annotation/json_annotation.dart'; part 'image.g.dart'; @JsonSerializable(fieldRename: FieldRename.snake) class ImageDTO { ImageDTO( {required this.url, required this.name, required this.oid}); String url; String name; String oid; factory ImageDTO.fromJson(Map json) => _$ImageDTOFromJson(json); Map toJson() => _$ImageDTOToJson(this); }