Commit Graph

16 Commits

Author SHA1 Message Date
cdabd1ee94 Fix back button when going back after swiping 2024-10-18 02:44:43 +02:00
3faf5295b1 Trying to fix bottom bar 2024-10-08 01:04:33 +02:00
ce373404ad Bloc is now global and responsible for all dates 2024-10-08 00:58:56 +02:00
cb18e1d1f0 Introduce PageView with manual switching of dates
1. Show PerDate widgets inside of an PageView
2. Introduce GoRouter so we can intercept back button taps with
   BackButtonListener
3. Implement rudimentary navigation
4. Fix bug that still showed a spinner event when the barcode was not
   found.
2024-10-06 02:20:08 +02:00
37cceb3a9b Fix bug that caused infinite loop for selecting FoodEntries
And also, the Cancel button is removed when the FoodEntry is selected.
2024-09-25 18:20:50 +02:00
f28626c49e Move select logic for FoodEntry into BLoC 2024-09-25 17:33:40 +02:00
ace03d98d2 Handle changing a food entry 2024-09-24 17:23:01 +02:00
a7a7f44050 Make scanned widgets appear in the list instead of putting the info into
the EnterFoodWidget.

1. Make scanned foods appear in the list of foods
2. Remove Controller for entering food

This commit removes the EnterFoodController that was used to put a
scanned food into the EnterFoodWidget.
This is now unnecessary because scanning a product will be distributed
via the FoodBLoC.
2024-09-24 14:41:42 +02:00
109d3e23de Fix bug that left PerDate widget empty when popped to.
Previously, when you would navigate to a PerDate widget that already
exists on the Navigation stack, a food that is entered will not be
visible when popping to the PerDate widget with the same date.

This is because the state is not updated (the BLoC exists per PerDate
widget, and a change in one widget does not cause firing an event in the previous widget's BLoC).

With this fix, we call setState() and update the entries for the widget
from storage.
2024-09-13 16:52:47 +02:00
54157f6dec style Snackbar. still need to find a solution for async gaps in onPressed() for ScanButton 2024-09-08 15:07:39 +02:00
df6e5dd8cb Add error handling for food scanning and make sum widget have different colors depending on difference to limit setting. 2024-09-08 01:57:40 +02:00
1a4614f331 Remove go_router because I could not figure out why initState() was called on my widget, thus clearing state when I did not expect it 2024-09-07 01:38:03 +02:00
4afb3ca319 Make it work with relying the data for 'EnterFoodWidget' onto the InheritedWidget 2024-09-07 00:02:07 +02:00
3493790598 wip introduce scanner 2024-09-06 19:03:41 +02:00
1f06e7b936 Fixed project. Now it builds 2024-09-06 19:00:25 +02:00
45f44099a1 Refactor code 2024-09-06 13:48:56 +02:00