import 'package:json_annotation/json_annotation.dart'; part 'food_dto.g.dart'; @JsonSerializable(createToJson: false) class FoodsDto{ final List? meals; const FoodsDto({this.meals}); factory FoodsDto.fromJson(Map json) => _$FoodsDtoFromJson(json); } @JsonSerializable(createToJson: false) class FoodDataDto{ final String? idMeal; final String? strMeal; final String? strMealThumb; const FoodDataDto({this.idMeal, this.strMeal, this.strMealThumb}); factory FoodDataDto.fromJson(Map json) => _$FoodDataDtoFromJson(json); }