mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
if meals logging gets a snackbar, ingredients logging should too
This commit is contained in:
@@ -135,6 +135,14 @@ Widget IngredientLogForm(NutritionalPlan plan) {
|
||||
onSave: (BuildContext context, MealItem mealItem, DateTime? dt) {
|
||||
Provider.of<NutritionPlansProvider>(context, listen: false)
|
||||
.logIngredientToDiary(mealItem, plan.id!, dt);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text(
|
||||
'Ingredient logged to diary',
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
withDate: true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user