Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve UX of logging meals to diary #599

Merged
merged 17 commits into from
Jun 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
if meals logging gets a snackbar, ingredients logging should too
Dieterbe committed Jun 5, 2024

Verified

This commit was signed with the committer’s verified signature.
not-an-aardvark Teddy Katz
commit fc947e9e592cf77da403d8f8228e5c0f72425dc6
8 changes: 8 additions & 0 deletions lib/widgets/nutrition/forms.dart
Original file line number Diff line number Diff line change
@@ -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',
Dieterbe marked this conversation as resolved.
Show resolved Hide resolved
textAlign: TextAlign.center,
),
),
);
},
withDate: true);
}