feat:更新菜谱表单

This commit is contained in:
2026-06-28 23:17:00 +08:00
parent c10e8e5ffb
commit 613e50b0da
5 changed files with 275 additions and 330 deletions

View File

@@ -161,6 +161,29 @@ class Recipe {
factory Recipe.fromJson(Map<String, dynamic> json) => _$RecipeFromJson(json);
Map<String, dynamic> toJson() => _$RecipeToJson(this);
static Recipe getEmpty() {
return Recipe(
id: 0,
name: '',
category: '家常菜',
recommendRate: 3,
remark: '',
isShare: true,
userId: 0,
username: '',
avatar: '',
materialList: [],
stepList: [],
recordList: [],
likeList: [],
likeCount: 0,
favouriteList: [],
favouriteCount: 0,
commentList: [],
commentCount: 0,
);
}
}
@JsonSerializable()