36 lines
1.2 KiB
Dart
36 lines
1.2 KiB
Dart
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||
|
|
||
|
part of 'pokemon_dto.dart';
|
||
|
|
||
|
// **************************************************************************
|
||
|
// JsonSerializableGenerator
|
||
|
// **************************************************************************
|
||
|
|
||
|
PokemonDto _$PokemonDtoFromJson(Map<String, dynamic> json) => PokemonDto(
|
||
|
id: (json['id'] as num).toInt(),
|
||
|
name: json['name'] as String,
|
||
|
types: (json['types'] as List<dynamic>)
|
||
|
.map((e) => PokemonTypeDto.fromJson(e as Map<String, dynamic>))
|
||
|
.toList(),
|
||
|
sprites:
|
||
|
PokemonSpritesDto.fromJson(json['sprites'] as Map<String, dynamic>),
|
||
|
);
|
||
|
|
||
|
PokemonTypeDto _$PokemonTypeDtoFromJson(Map<String, dynamic> json) =>
|
||
|
PokemonTypeDto(
|
||
|
slot: (json['slot'] as num).toInt(),
|
||
|
type: PokemonTypeDetailDto.fromJson(json['type'] as Map<String, dynamic>),
|
||
|
);
|
||
|
|
||
|
PokemonTypeDetailDto _$PokemonTypeDetailDtoFromJson(
|
||
|
Map<String, dynamic> json) =>
|
||
|
PokemonTypeDetailDto(
|
||
|
name: json['name'] as String,
|
||
|
url: json['url'] as String,
|
||
|
);
|
||
|
|
||
|
PokemonSpritesDto _$PokemonSpritesDtoFromJson(Map<String, dynamic> json) =>
|
||
|
PokemonSpritesDto(
|
||
|
front_default: json['front_default'] as String,
|
||
|
);
|