import 'package:json_annotation/json_annotation.dart'; part 'spells_dto.g.dart'; @JsonSerializable(createToJson: false) class SpellDto { final List? data; const SpellDto({ this.data, }); factory SpellDto.fromJson(Map json) => _$SpellDtoFromJson(json); } @JsonSerializable(createToJson: false) class SpellDataDto { final String? id; final String? type; final SpellAttributesDataDto? attributes; const SpellDataDto({ this.id, this.type, this.attributes, }); factory SpellDataDto.fromJson(Map json) => _$SpellDataDtoFromJson(json); } @JsonSerializable(createToJson: false) class SpellAttributesDataDto { final String? slug; // хз final String? category; // категория final String? creator; // создатель final String? effect; // воздействие final String? hand; // взмах final String? image; // картинка final String? incantation; // произношение final String? light; // цвет final String? name; // название final String? wiki; // ссылка на вики const SpellAttributesDataDto({ this.slug, this.category, this.creator, this.effect, this.hand, this.image, this.incantation, this.light, this.name, this.wiki, }); factory SpellAttributesDataDto.fromJson(Map json) => _$SpellAttributesDataDtoFromJson(json); }