feat(feed): add diets api and create blog post screen, fix status bar

This commit is contained in:
mso7nueh
2024-08-08 10:39:53 +03:00
parent 21e03d956c
commit f4c6aebdff
67 changed files with 4253 additions and 1617 deletions

View File

@@ -6,24 +6,32 @@ 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),
title: json['title'] as String,
type: json['type'] as String,
slug: json['slug'] as String,
commentsCount: (json['comments_count'] as num).toInt(),
commentsCount: (json['total_comments'] as num).toInt(),
likesCount: (json['total_likes'] as num).toInt(),
viewsCount: (json['total_views'] 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,
@@ -37,16 +45,20 @@ Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) => <String, dy
'title': instance.title,
'type': instance.type,
'slug': instance.slug,
'comments_count': instance.commentsCount,
'total_comments': instance.commentsCount,
'total_likes': instance.likesCount,
'total_views': instance.viewsCount,
};
_$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,
@@ -57,7 +69,8 @@ _$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,
};