fix(blog posts, diets, plans, recipies): changed name of json field for descriptions of models

This commit is contained in:
Username1548
2025-03-28 20:36:09 +07:00
parent 7008276735
commit f9741adf1e
24 changed files with 134 additions and 208 deletions

View File

@@ -35,21 +35,14 @@ class Recipe with _$Recipe {
@freezed
class Ingredient with _$Ingredient {
const factory Ingredient({
required String name,
String? unit,
required String portion,
}) = _Ingredient;
const factory Ingredient({required String name, String? unit, required String portion}) = _Ingredient;
factory Ingredient.fromJson(Map<String, Object?> json) => _$IngredientFromJson(json);
}
@freezed
class Step with _$Step {
const factory Step({
required String image,
required String description,
}) = _Step;
const factory Step({required String image, @JsonKey(name: 'description_md') required String description}) = _Step;
factory Step.fromJson(Map<String, Object?> json) => _$StepFromJson(json);
}