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

32 lines
1.2 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(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
types: (json['types'] as List<dynamic>)
.map((e) => PokemonTypeDto.fromJson(e as Map<String, dynamic>))
.toList(),
2024-10-17 12:19:06 +04:00
sprites: PokemonSpritesDto.fromJson(json['sprites'] as Map<String, dynamic>),
2024-10-14 21:25:43 +04:00
);
2024-10-17 12:19:06 +04:00
PokemonTypeDto _$PokemonTypeDtoFromJson(Map<String, dynamic> json) => PokemonTypeDto(
2024-10-14 21:25:43 +04:00
slot: (json['slot'] as num).toInt(),
type: PokemonTypeDetailDto.fromJson(json['type'] as Map<String, dynamic>),
);
2024-10-17 12:19:06 +04:00
PokemonTypeDetailDto _$PokemonTypeDetailDtoFromJson(Map<String, dynamic> json) =>
2024-10-14 21:25:43 +04:00
PokemonTypeDetailDto(
name: json['name'] as String,
url: json['url'] as String,
);
2024-10-17 12:19:06 +04:00
PokemonSpritesDto _$PokemonSpritesDtoFromJson(Map<String, dynamic> json) => PokemonSpritesDto(
2024-10-14 21:25:43 +04:00
front_default: json['front_default'] as String,
);