PIbd-32_Chubykina_P.P._mobilki/lib/data/dtos/pokemon_dto.g.dart

53 lines
1.8 KiB
Dart
Raw Normal View History

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(
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(),
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(
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
);
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,
);