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

49 lines
1.6 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(
2024-10-18 21:36:44 +04:00
data: (json['data'] as List<dynamic>?)
?.map((e) => PokemonDataDto.fromJson(e as Map<String, dynamic>))
.toList(),
2024-10-18 21:36:44 +04:00
meta: json['meta'] == null
? 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
? null
2024-10-18 21:36:44 +04:00
: PokemonAttributesDataDto.fromJson(
json['attributes'] as Map<String, dynamic>),
);
2024-10-18 21:36:44 +04:00
PokemonAttributesDataDto _$PokemonAttributesDataDtoFromJson(
Map<String, dynamic> json) =>
PokemonAttributesDataDto(
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-18 21:36:44 +04:00
MetaDto _$MetaDtoFromJson(Map<String, dynamic> json) => MetaDto(
pagination: json['pagination'] == null
? 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
);