forked from eatvio/eatvio_app
fix: recipe loading
This commit is contained in:
@@ -13,7 +13,7 @@ class Recipe with _$Recipe {
|
||||
@JsonKey(name: 'cooking_time') required int cookingTime,
|
||||
@JsonKey(name: 'active_time') required int activeCookingTime,
|
||||
required List<Ingredient>? ingredients,
|
||||
required String description,
|
||||
@JsonKey(name: 'description_md') required String description,
|
||||
required List<Step>? steps,
|
||||
@JsonKey(name: 'video_url') required String? videoUrl,
|
||||
@JsonKey(name: 'created_at') required DateTime createdAt,
|
||||
|
||||
@@ -29,6 +29,7 @@ mixin _$Recipe {
|
||||
@JsonKey(name: 'active_time')
|
||||
int get activeCookingTime => throw _privateConstructorUsedError;
|
||||
List<Ingredient>? get ingredients => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'description_md')
|
||||
String get description => throw _privateConstructorUsedError;
|
||||
List<Step>? get steps => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'video_url')
|
||||
@@ -75,7 +76,7 @@ abstract class $RecipeCopyWith<$Res> {
|
||||
@JsonKey(name: 'cooking_time') int cookingTime,
|
||||
@JsonKey(name: 'active_time') int activeCookingTime,
|
||||
List<Ingredient>? ingredients,
|
||||
String description,
|
||||
@JsonKey(name: 'description_md') String description,
|
||||
List<Step>? steps,
|
||||
@JsonKey(name: 'video_url') String? videoUrl,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@@ -270,7 +271,7 @@ abstract class _$$RecipesImplCopyWith<$Res> implements $RecipeCopyWith<$Res> {
|
||||
@JsonKey(name: 'cooking_time') int cookingTime,
|
||||
@JsonKey(name: 'active_time') int activeCookingTime,
|
||||
List<Ingredient>? ingredients,
|
||||
String description,
|
||||
@JsonKey(name: 'description_md') String description,
|
||||
List<Step>? steps,
|
||||
@JsonKey(name: 'video_url') String? videoUrl,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@@ -449,7 +450,7 @@ class _$RecipesImpl implements _Recipes {
|
||||
@JsonKey(name: 'cooking_time') required this.cookingTime,
|
||||
@JsonKey(name: 'active_time') required this.activeCookingTime,
|
||||
required final List<Ingredient>? ingredients,
|
||||
required this.description,
|
||||
@JsonKey(name: 'description_md') required this.description,
|
||||
required final List<Step>? steps,
|
||||
@JsonKey(name: 'video_url') required this.videoUrl,
|
||||
@JsonKey(name: 'created_at') required this.createdAt,
|
||||
@@ -493,6 +494,7 @@ class _$RecipesImpl implements _Recipes {
|
||||
}
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'description_md')
|
||||
final String description;
|
||||
final List<Step>? _steps;
|
||||
@override
|
||||
@@ -637,7 +639,7 @@ abstract class _Recipes implements Recipe {
|
||||
@JsonKey(name: 'cooking_time') required final int cookingTime,
|
||||
@JsonKey(name: 'active_time') required final int activeCookingTime,
|
||||
required final List<Ingredient>? ingredients,
|
||||
required final String description,
|
||||
@JsonKey(name: 'description_md') required final String description,
|
||||
required final List<Step>? steps,
|
||||
@JsonKey(name: 'video_url') required final String? videoUrl,
|
||||
@JsonKey(name: 'created_at') required final DateTime createdAt,
|
||||
@@ -671,6 +673,7 @@ abstract class _Recipes implements Recipe {
|
||||
@override
|
||||
List<Ingredient>? get ingredients;
|
||||
@override
|
||||
@JsonKey(name: 'description_md')
|
||||
String get description;
|
||||
@override
|
||||
List<Step>? get steps;
|
||||
|
||||
@@ -17,7 +17,7 @@ _$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) =>
|
||||
(json['ingredients'] as List<dynamic>?)
|
||||
?.map((e) => Ingredient.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
description: json['description'] as String,
|
||||
description: json['description_md'] as String,
|
||||
steps:
|
||||
(json['steps'] as List<dynamic>?)
|
||||
?.map((e) => Step.fromJson(e as Map<String, dynamic>))
|
||||
@@ -45,7 +45,7 @@ Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) =>
|
||||
'cooking_time': instance.cookingTime,
|
||||
'active_time': instance.activeCookingTime,
|
||||
'ingredients': instance.ingredients,
|
||||
'description': instance.description,
|
||||
'description_md': instance.description,
|
||||
'steps': instance.steps,
|
||||
'video_url': instance.videoUrl,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
|
||||
Reference in New Issue
Block a user