From 9f1b790c860e4ad381111c5a494e9d7b6097953e Mon Sep 17 00:00:00 2001 From: ohwhylin Date: Sat, 16 Nov 2024 12:59:34 +0400 Subject: [PATCH] =?UTF-8?q?=D1=87=D1=82=D0=BE=20=D1=82=D0=BE=20=D0=B4?= =?UTF-8?q?=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/data/dtos/pokemon_dto.g.dart | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 lib/data/dtos/pokemon_dto.g.dart diff --git a/lib/data/dtos/pokemon_dto.g.dart b/lib/data/dtos/pokemon_dto.g.dart new file mode 100644 index 0000000..7e7ce83 --- /dev/null +++ b/lib/data/dtos/pokemon_dto.g.dart @@ -0,0 +1,42 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'pokemon_dto.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PokemonDto _$PokemonDtoFromJson(Map json) => PokemonDto( + results: (json['results'] as List?) + ?.map((e) => PokemonDataDto.fromJson(e as Map)) + .toList(), + count: (json['count'] as num?)?.toInt(), + next: json['next'] as String?, + previous: json['previous'] as String?, + ); + +PokemonDataDto _$PokemonDataDtoFromJson(Map json) => + PokemonDataDto( + name: json['name'] as String?, + url: json['url'] as String?, + ); + +PokemonDetailsDto _$PokemonDetailsDtoFromJson(Map json) => + PokemonDetailsDto( + height: (json['height'] as num?)?.toInt(), + weight: (json['weight'] as num?)?.toInt(), + abilities: (json['abilities'] as List?) + ?.map((e) => AbilityDto.fromJson(e as Map)) + .toList(), + ); + +AbilityDto _$AbilityDtoFromJson(Map json) => AbilityDto( + ability: json['ability'] == null + ? null + : AbilityDetailDto.fromJson(json['ability'] as Map), + ); + +AbilityDetailDto _$AbilityDetailDtoFromJson(Map json) => + AbilityDetailDto( + name: json['name'] as String?, + );