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

49 lines
1.7 KiB
Dart
Raw Normal View History

2024-11-16 12:59:34 +04:00
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'pokemon_dto.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
PokemonDto _$PokemonDtoFromJson(Map<String, dynamic> json) => PokemonDto(
2024-11-19 23:43:02 +04:00
data: (json['data'] as List<dynamic>?)
2024-11-16 12:59:34 +04:00
?.map((e) => PokemonDataDto.fromJson(e as Map<String, dynamic>))
.toList(),
2024-11-19 23:43:02 +04:00
meta: json['meta'] == null
? null
: MetaDto.fromJson(json['meta'] as Map<String, dynamic>),
2024-11-16 12:59:34 +04:00
);
PokemonDataDto _$PokemonDataDtoFromJson(Map<String, dynamic> json) =>
PokemonDataDto(
2024-11-19 23:43:02 +04:00
id: json['id'] as String?,
2024-11-16 12:59:34 +04:00
name: json['name'] as String?,
2024-11-19 23:43:02 +04:00
types:
(json['types'] as List<dynamic>?)?.map((e) => e as String).toList(),
evolvesTo: (json['evolvesTo'] as List<dynamic>?)
?.map((e) => e as String)
2024-11-16 12:59:34 +04:00
.toList(),
2024-11-19 23:43:02 +04:00
images: json['images'] == null
? null
: PokemonImagesDto.fromJson(json['images'] as Map<String, dynamic>),
2024-11-16 12:59:34 +04:00
);
2024-11-19 23:43:02 +04:00
PokemonImagesDto _$PokemonImagesDtoFromJson(Map<String, dynamic> json) =>
PokemonImagesDto(
small: json['small'] as String?,
);
MetaDto _$MetaDtoFromJson(Map<String, dynamic> json) => MetaDto(
pagination: json['pagination'] == null
2024-11-16 12:59:34 +04:00
? null
2024-11-19 23:43:02 +04:00
: PaginationDto.fromJson(json['pagination'] as Map<String, dynamic>),
2024-11-16 12:59:34 +04:00
);
2024-11-19 23:43:02 +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-11-16 12:59:34 +04:00
);