forked from eatvio/eatvio_app
feat: implement UI for managing recipe ingredients with glossary search, nutritional calculation, and moderation request functionality.
This commit is contained in:
@@ -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 {}
|
||||
|
||||
@@ -75,6 +75,7 @@ class _IngredientsWidgetState extends State<IngredientsWidget> {
|
||||
ListTile(
|
||||
key: AppKeys.recipeCreateScreenAddIngredientButton,
|
||||
onTap: () {
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
nameController.clear();
|
||||
gramsController.clear();
|
||||
pcsController.clear();
|
||||
|
||||
Reference in New Issue
Block a user