forked from eatvio/eatvio_app
fix(blog posts, diets, plans, recipies): changed name of json field for descriptions of models
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user