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

39 lines
1.3 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'pokemon_dto.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
PokemonDto _$PokemonDtoFromJson(Map<String, dynamic> json) => PokemonDto(
results: (json['results'] as List<dynamic>?)
?.map((e) => PokemonDataDto.fromJson(e as Map<String, dynamic>))
.toList(),
count: (json['count'] as num?)?.toInt(),
next: json['next'] as String?,
previous: json['previous'] as String?,
);
PokemonDataDto _$PokemonDataDtoFromJson(Map<String, dynamic> json) =>
PokemonDataDto(
id: json['id'] as String?,
name: json['name'] as String?,
attributes: json['attributes'] == null
? null
: PokemonAttributesDto.fromJson(
json['attributes'] as Map<String, dynamic>),
);
PokemonAttributesDto _$PokemonAttributesDtoFromJson(
Map<String, dynamic> json) =>
PokemonAttributesDto(
type: json['type'] as String?,
height: (json['height'] as num?)?.toInt(),
weight: (json['weight'] as num?)?.toInt(),
abilities: (json['abilities'] as List<dynamic>?)
?.map((e) => e as String)
.toList(),
image: json['image'] as String?,
);