feat: implement UI for managing recipe ingredients with glossary search, nutritional calculation, and moderation request functionality.

This commit is contained in:
mso7nueh
2026-01-22 00:50:20 +03:00
parent e76c1aed20
commit 4bacdf5e76
2 changed files with 3 additions and 0 deletions

View File

@@ -131,6 +131,7 @@ class _AddPortionWidgetState extends State<AddPortionWidget> {
if (widget.portionIndex != null)
InkWell(
onTap: () {
FocusScope.of(context).unfocus();
widget.createRecipeCubit.removeIngredient(widget.portionIndex!);
Navigator.of(context).pop();
},
@@ -189,6 +190,7 @@ class _AddPortionWidgetState extends State<AddPortionWidget> {
Ingredient(name: portion.name, unit: portion.portion.getValue(), portion: portion.quantity.toString(), productId: glossary.id),
);
if (context.mounted) {
FocusScope.of(context).unfocus();
Navigator.of(context).pop();
}
} else {}

View File

@@ -75,6 +75,7 @@ class _IngredientsWidgetState extends State<IngredientsWidget> {
ListTile(
key: AppKeys.recipeCreateScreenAddIngredientButton,
onTap: () {
FocusManager.instance.primaryFocus?.unfocus();
nameController.clear();
gramsController.clear();
pcsController.clear();