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-18 21:36:44 +04:00
|
|
|
data: (json['data'] as List<dynamic>?)
|
|
|
|
?.map((e) => PokemonDataDto.fromJson(e as Map<String, dynamic>))
|
2024-10-17 00:37:52 +04:00
|
|
|
.toList(),
|
2024-10-18 21:36:44 +04:00
|
|
|
meta: json['meta'] == null
|
2024-10-17 00:37:52 +04:00
|
|
|
? null
|
2024-10-18 21:36:44 +04:00
|
|
|
: MetaDto.fromJson(json['meta'] as Map<String, dynamic>),
|
2024-10-14 21:25:43 +04:00
|
|
|
);
|
|
|
|
|
2024-10-18 21:36:44 +04:00
|
|
|
PokemonDataDto _$PokemonDataDtoFromJson(Map<String, dynamic> json) =>
|
|
|
|
PokemonDataDto(
|
|
|
|
id: json['id'] as String?,
|
|
|
|
type: json['type'] as String?,
|
|
|
|
attributes: json['attributes'] == null
|
2024-10-17 00:37:52 +04:00
|
|
|
? null
|
2024-10-18 21:36:44 +04:00
|
|
|
: PokemonAttributesDataDto.fromJson(
|
|
|
|
json['attributes'] as Map<String, dynamic>),
|
2024-10-17 00:37:52 +04:00
|
|
|
);
|
|
|
|
|
2024-10-18 21:36:44 +04:00
|
|
|
PokemonAttributesDataDto _$PokemonAttributesDataDtoFromJson(
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
PokemonAttributesDataDto(
|
2024-10-17 00:37:52 +04:00
|
|
|
name: json['name'] as String?,
|
2024-10-18 21:36:44 +04:00
|
|
|
height: json['height'] as String?,
|
|
|
|
weight: json['weight'] as String?,
|
|
|
|
image: json['image'] as String?,
|
2024-10-17 00:37:52 +04:00
|
|
|
);
|
|
|
|
|
2024-10-18 21:36:44 +04:00
|
|
|
MetaDto _$MetaDtoFromJson(Map<String, dynamic> json) => MetaDto(
|
|
|
|
pagination: json['pagination'] == null
|
2024-10-17 00:37:52 +04:00
|
|
|
? null
|
2024-10-18 21:36:44 +04:00
|
|
|
: PaginationDto.fromJson(json['pagination'] as Map<String, dynamic>),
|
2024-10-14 21:25:43 +04:00
|
|
|
);
|
|
|
|
|
2024-10-18 21:36:44 +04:00
|
|
|
PaginationDto _$PaginationDtoFromJson(Map<String, dynamic> json) =>
|
|
|
|
PaginationDto(
|
|
|
|
current: (json['current'] as num?)?.toInt(),
|
|
|
|
next: (json['next'] as num?)?.toInt(),
|
|
|
|
last: (json['last'] as num?)?.toInt(),
|
2024-10-14 21:25:43 +04:00
|
|
|
);
|