2024-10-14 21:25:43 +04:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
|
|
|
part of 'pokemon_dto.dart';
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
|
|
|
PokemonDto _$PokemonDtoFromJson(Map<String, dynamic> json) => PokemonDto(
|
2024-10-17 00:37:52 +04:00
|
|
|
name: json['name'] as String?,
|
|
|
|
baseExperience: (json['baseExperience'] as num?)?.toInt(),
|
|
|
|
types: (json['types'] as List<dynamic>?)
|
|
|
|
?.map((e) => PokemonTypeDto.fromJson(e as Map<String, dynamic>))
|
2024-10-14 21:25:43 +04:00
|
|
|
.toList(),
|
2024-10-17 00:37:52 +04:00
|
|
|
abilities: (json['abilities'] as List<dynamic>?)
|
|
|
|
?.map((e) => PokemonAbilityDto.fromJson(e as Map<String, dynamic>))
|
|
|
|
.toList(),
|
|
|
|
sprites: json['sprites'] == null
|
|
|
|
? null
|
|
|
|
: PokemonSpritesDto.fromJson(json['sprites'] as Map<String, dynamic>),
|
2024-10-14 21:25:43 +04:00
|
|
|
);
|
|
|
|
|
|
|
|
PokemonTypeDto _$PokemonTypeDtoFromJson(Map<String, dynamic> json) =>
|
|
|
|
PokemonTypeDto(
|
2024-10-17 00:37:52 +04:00
|
|
|
slot: (json['slot'] as num?)?.toInt(),
|
|
|
|
type: json['type'] == null
|
|
|
|
? null
|
|
|
|
: TypeDto.fromJson(json['type'] as Map<String, dynamic>),
|
|
|
|
);
|
|
|
|
|
|
|
|
TypeDto _$TypeDtoFromJson(Map<String, dynamic> json) => TypeDto(
|
|
|
|
name: json['name'] as String?,
|
|
|
|
url: json['url'] as String?,
|
|
|
|
);
|
|
|
|
|
|
|
|
PokemonAbilityDto _$PokemonAbilityDtoFromJson(Map<String, dynamic> json) =>
|
|
|
|
PokemonAbilityDto(
|
|
|
|
slot: (json['slot'] as num?)?.toInt(),
|
|
|
|
ability: json['ability'] == null
|
|
|
|
? null
|
|
|
|
: AbilityDto.fromJson(json['ability'] as Map<String, dynamic>),
|
2024-10-14 21:25:43 +04:00
|
|
|
);
|
|
|
|
|
2024-10-17 00:37:52 +04:00
|
|
|
AbilityDto _$AbilityDtoFromJson(Map<String, dynamic> json) => AbilityDto(
|
|
|
|
name: json['name'] as String?,
|
|
|
|
url: json['url'] as String?,
|
2024-10-14 21:25:43 +04:00
|
|
|
);
|
|
|
|
|
|
|
|
PokemonSpritesDto _$PokemonSpritesDtoFromJson(Map<String, dynamic> json) =>
|
|
|
|
PokemonSpritesDto(
|
|
|
|
front_default: json['front_default'] as String,
|
|
|
|
);
|