import 'package:json_annotation/json_annotation.dart'; part 'potions_dto.g.dart'; @JsonSerializable(createToJson: false) class PotionsDto { final List? data; const PotionsDto({this.data}); factory PotionsDto.fromJson(Map json) => _$PotionsDtoFromJson(json); } @JsonSerializable(createToJson: false) class PotionDataDto { final String? id; final String? type; final PotionAttributesDataDto? attributes; const PotionDataDto({this.id, this.type, this.attributes}); factory PotionDataDto.fromJson(Map json) => _$PotionDataDtoFromJson(json); } @JsonSerializable(createToJson: false) class PotionAttributesDataDto { final String? name; final String? characteristics; final String? effect; final String? image; const PotionAttributesDataDto({this.name, this.characteristics, this.effect, this.image}); factory PotionAttributesDataDto.fromJson(Map json) => _$PotionAttributesDataDtoFromJson(json); }