forked from eatvio/eatvio_app
89 lines
3.3 KiB
Dart
89 lines
3.3 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'recipes_model.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
_$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) =>
|
|
_$RecipesImpl(
|
|
id: (json['id'] as num).toInt(),
|
|
image: json['image'] as String,
|
|
state: json['state'] as String,
|
|
cookingTime: (json['cooking_time'] as num).toInt(),
|
|
activeCookingTime: (json['active_time'] as num).toInt(),
|
|
ingredients:
|
|
(json['ingredients'] as List<dynamic>?)
|
|
?.map((e) => Ingredient.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
description: json['description_md'] as String,
|
|
steps:
|
|
(json['steps'] as List<dynamic>?)
|
|
?.map((e) => Step.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
videoUrl: json['video_url'] as String?,
|
|
createdAt: DateTime.parse(json['created_at'] as String),
|
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
|
title: json['title'] as String?,
|
|
type: json['type'] as String?,
|
|
slug: json['slug'] as String,
|
|
commentsCount: (json['total_comments'] as num).toInt(),
|
|
wasLikedByMe: json['was_liked_by_me'] as bool,
|
|
isFavorite: json['is_favorite'] as bool,
|
|
calories: (json['energy_per_serving'] as num).toDouble(),
|
|
likesCount: (json['total_likes'] as num).toInt(),
|
|
viewsCount: (json['total_views'] as num).toInt(),
|
|
author: Author.fromJson(json['author'] as Map<String, dynamic>),
|
|
);
|
|
|
|
Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) =>
|
|
<String, dynamic>{
|
|
'id': instance.id,
|
|
'image': instance.image,
|
|
'state': instance.state,
|
|
'cooking_time': instance.cookingTime,
|
|
'active_time': instance.activeCookingTime,
|
|
'ingredients': instance.ingredients,
|
|
'description_md': instance.description,
|
|
'steps': instance.steps,
|
|
'video_url': instance.videoUrl,
|
|
'created_at': instance.createdAt.toIso8601String(),
|
|
'updated_at': instance.updatedAt.toIso8601String(),
|
|
'title': instance.title,
|
|
'type': instance.type,
|
|
'slug': instance.slug,
|
|
'total_comments': instance.commentsCount,
|
|
'was_liked_by_me': instance.wasLikedByMe,
|
|
'is_favorite': instance.isFavorite,
|
|
'energy_per_serving': instance.calories,
|
|
'total_likes': instance.likesCount,
|
|
'total_views': instance.viewsCount,
|
|
'author': instance.author,
|
|
};
|
|
|
|
_$IngredientImpl _$$IngredientImplFromJson(Map<String, dynamic> json) =>
|
|
_$IngredientImpl(
|
|
name: json['name'] as String,
|
|
unit: json['unit'] as String?,
|
|
portion: json['portion'] as String,
|
|
);
|
|
|
|
Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) =>
|
|
<String, dynamic>{
|
|
'name': instance.name,
|
|
'unit': instance.unit,
|
|
'portion': instance.portion,
|
|
};
|
|
|
|
_$StepImpl _$$StepImplFromJson(Map<String, dynamic> json) => _$StepImpl(
|
|
image: json['image'] as String,
|
|
description: json['description_md'] as String,
|
|
);
|
|
|
|
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) =>
|
|
<String, dynamic>{
|
|
'image': instance.image,
|
|
'description_md': instance.description,
|
|
};
|