forked from eatvio/eatvio_app
feat: Implement 'My Recipes' feature, add diary moderation request modal, and introduce diary repository.
This commit is contained in:
@@ -155,7 +155,10 @@ class _MyRecipeWidgetState extends State<MyRecipeWidget> {
|
||||
final fullRecipe = await context.read<MyRecipesCubit>().getRecipeById(widget.recipe.slug);
|
||||
if (context.mounted) {
|
||||
Navigator.pop(context); // close dialog
|
||||
context.push(RecipeCreateScreen.path, extra: fullRecipe);
|
||||
await context.push(RecipeCreateScreen.path, extra: fullRecipe);
|
||||
if (context.mounted) {
|
||||
context.read<MyRecipesCubit>().setDraftedState();
|
||||
}
|
||||
}
|
||||
},
|
||||
height: 52,
|
||||
@@ -236,10 +239,13 @@ class _MyRecipeWidgetState extends State<MyRecipeWidget> {
|
||||
} else {
|
||||
showErrorToast('Заполните все необходимые поля для публикации рецепта');
|
||||
if (context.mounted) {
|
||||
context.push(RecipeCreateScreen.path, extra: {
|
||||
await context.push(RecipeCreateScreen.path, extra: {
|
||||
'recipe': fullRecipe,
|
||||
'autoValidate': true,
|
||||
});
|
||||
if (context.mounted) {
|
||||
context.read<MyRecipesCubit>().setDraftedState();
|
||||
}
|
||||
}
|
||||
}
|
||||
await createCubit.close();
|
||||
|
||||
Reference in New Issue
Block a user