From 89d2b1786d3abb2fcfa459cc02e44b58db773467 Mon Sep 17 00:00:00 2001 From: DyCTaTOR <125912249+DyCTaTOR@users.noreply.github.com> Date: Tue, 22 Oct 2024 08:56:56 +0400 Subject: [PATCH] lab5 --- lib/data/dtos/characters_dto.g.dart | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lib/data/dtos/characters_dto.g.dart diff --git a/lib/data/dtos/characters_dto.g.dart b/lib/data/dtos/characters_dto.g.dart new file mode 100644 index 0000000..bdf38d5 --- /dev/null +++ b/lib/data/dtos/characters_dto.g.dart @@ -0,0 +1,34 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'characters_dto.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +CharactersDto _$CharactersDtoFromJson(Map json) => + CharactersDto( + data: (json['data'] as List?) + ?.map((e) => CharacterDataDto.fromJson(e as Map)) + .toList(), + ); + +CharacterDataDto _$CharacterDataDtoFromJson(Map json) => + CharacterDataDto( + id: json['id'] as String?, + type: json['type'] as String?, + attributes: json['attributes'] == null + ? null + : CharacterAttributesDataDto.fromJson( + json['attributes'] as Map), + ); + +CharacterAttributesDataDto _$CharacterAttributesDataDtoFromJson( + Map json) => + CharacterAttributesDataDto( + name: json['name'] as String?, + age: json['age'] as String?, + courses: + (json['courses'] as List?)?.map((e) => e as String).toList(), + image: json['image'] as String?, + );