forked from eatvio/eatvio_app
58 lines
1.9 KiB
Dart
58 lines
1.9 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'recipe_create_model.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
_$RecipeCreateModelImpl _$$RecipeCreateModelImplFromJson(
|
|
Map<String, dynamic> json,
|
|
) => _$RecipeCreateModelImpl(
|
|
title: json['title'] as String,
|
|
state: json['state'] as String,
|
|
description: json['description_md'] as String,
|
|
type: $enumDecode(_$RecipeTypeEnumMap, json['type']),
|
|
videoUrl: json['video_url'] as String?,
|
|
cookingTime: json['cooking_time'] as String?,
|
|
activeTime: json['active_time'] as String?,
|
|
servings: json['servings'] as String,
|
|
energyPerServing: json['energy_per_serving'] as String,
|
|
tags: (json['tags'] as List<dynamic>).map((e) => e as String).toList(),
|
|
ingredients:
|
|
(json['ingredients'] as List<dynamic>)
|
|
.map((e) => Ingredient.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
steps:
|
|
(json['steps'] as List<dynamic>)
|
|
.map((e) => Step.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
);
|
|
|
|
Map<String, dynamic> _$$RecipeCreateModelImplToJson(
|
|
_$RecipeCreateModelImpl instance,
|
|
) => <String, dynamic>{
|
|
'title': instance.title,
|
|
'state': instance.state,
|
|
'description_md': instance.description,
|
|
'type': _$RecipeTypeEnumMap[instance.type]!,
|
|
'video_url': instance.videoUrl,
|
|
'cooking_time': instance.cookingTime,
|
|
'active_time': instance.activeTime,
|
|
'servings': instance.servings,
|
|
'energy_per_serving': instance.energyPerServing,
|
|
'tags': instance.tags,
|
|
'ingredients': instance.ingredients,
|
|
'steps': instance.steps,
|
|
};
|
|
|
|
const _$RecipeTypeEnumMap = {
|
|
RecipeType.first_meals: 'first_meals',
|
|
RecipeType.second_meals: 'second_meals',
|
|
RecipeType.salads: 'salads',
|
|
RecipeType.snacks: 'snacks',
|
|
RecipeType.sweets: 'sweets',
|
|
RecipeType.drinks: 'drinks',
|
|
RecipeType.other: 'other',
|
|
};
|