import 'package:json_annotation/json_annotation.dart'; part 'recipes_dto.g.dart'; @JsonSerializable(createToJson: false) class RecipesDto { final List? hits; const RecipesDto({this.hits}); factory RecipesDto.fromJson(Map json) => _$RecipesDtoFromJson(json); } @JsonSerializable(createToJson: false) class RecipeDataDto { final RecipeAttributesDataDto? recipe; const RecipeDataDto({this.recipe}); factory RecipeDataDto.fromJson(Map json) => _$RecipeDataDtoFromJson(json); } @JsonSerializable(createToJson: false) class RecipeAttributesDataDto { final String? label; final double? calories; final String? url; final String? image; const RecipeAttributesDataDto({ this.label, this.calories, this.url, this.image, }); factory RecipeAttributesDataDto.fromJson(Map json) => _$RecipeAttributesDataDtoFromJson(json); }