39 lines
1.3 KiB
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?,
|
|
);
|