feat(feed): add recipes screen

This commit is contained in:
mso7nueh
2024-08-02 11:52:10 +03:00
parent c78f8dacdf
commit 904adbba2f
111 changed files with 1511 additions and 1784 deletions

View File

@@ -6,19 +6,14 @@ part of 'recipes_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) =>
_$RecipesImpl(
_$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(),
ingredients: (json['ingredients'] as List<dynamic>)
.map((e) => Ingredient.fromJson(e as Map<String, dynamic>))
.toList(),
ingredients: (json['ingredients'] as List<dynamic>).map((e) => Ingredient.fromJson(e as Map<String, dynamic>)).toList(),
description: json['description'] as String,
steps: (json['steps'] as List<dynamic>)
.map((e) => Step.fromJson(e as Map<String, dynamic>))
.toList(),
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),
@@ -28,8 +23,7 @@ _$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) =>
commentsCount: (json['comments_count'] as num).toInt(),
);
Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) => <String, dynamic>{
'id': instance.id,
'image': instance.image,
'state': instance.state,
@@ -46,15 +40,13 @@ Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) =>
'comments_count': instance.commentsCount,
};
_$IngredientImpl _$$IngredientImplFromJson(Map<String, dynamic> json) =>
_$IngredientImpl(
_$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>{
Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) => <String, dynamic>{
'name': instance.name,
'unit': instance.unit,
'portion': instance.portion,
@@ -65,8 +57,7 @@ _$StepImpl _$$StepImplFromJson(Map<String, dynamic> json) => _$StepImpl(
description: json['description'] as String,
);
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) => <String, dynamic>{
'image': instance.image,
'description': instance.description,
};