import 'package:json_annotation/json_annotation.dart'; part 'words_dto.g.dart'; @JsonSerializable(createToJson: false) class WordsDto { final List? data; final MetaDto? meta; const WordsDto({this.data, this.meta}); factory WordsDto.fromJson(Map json) => _$WordsDtoFromJson(json); } @JsonSerializable(createToJson: false) class WordDataDto { final String? id; final String? type; final WordAttributesDataDto? attributes; const WordDataDto({this.id, this.type, this.attributes}); factory WordDataDto.fromJson(Map json) => _$WordDataDtoFromJson(json); } @JsonSerializable(createToJson: false) class WordAttributesDataDto { final String? word; final String? translation; final String? image; factory WordAttributesDataDto.fromJson(Map json) => _$WordAttributesDataDtoFromJson(json); WordAttributesDataDto(this.word, this.translation, this.image); } @JsonSerializable(createToJson: false) class MetaDto { final PaginationDto? pagination; const MetaDto({this.pagination}); factory MetaDto.fromJson(Map json) => _$MetaDtoFromJson(json); } @JsonSerializable(createToJson: false) class PaginationDto { final int? current; final int? next; final int? last; const PaginationDto({this.current, this.next, this.last}); factory PaginationDto.fromJson(Map json) => _$PaginationDtoFromJson(json); }