Change behavior of global state #11

Merged
marco merged 1 commits from fix-global-state into master 2025-01-12 16:24:34 +00:00
Owner

Until now, FoodEntryBloc (which is holding the global state for every
day) would cause a change in every widget in the tree. For example, when
an entry for one day gets added, all other entries in opened days would
also be rebuilt.

Now, the GlobalState will be emitted with an additional date, which
signals, which date caused the state change.
With this information, I selectively only build the EntryLists that
needs to be rebuilt.

Additionally, the calendar FAB will push a new route instead of
navigating to a new day by utilizing the pageController.

Until now, FoodEntryBloc (which is holding the global state for every day) would cause a change in every widget in the tree. For example, when an entry for one day gets added, all other entries in opened days would also be rebuilt. Now, the GlobalState will be emitted with an additional date, which signals, which date caused the state change. With this information, I selectively only build the EntryLists that needs to be rebuilt. Additionally, the calendar FAB will push a new route instead of navigating to a new day by utilizing the pageController.
marco added 1 commit 2025-01-12 16:21:02 +00:00
Until now, FoodEntryBloc (which is holding the global state  for every
day) would cause a change in every widget in the tree. For example, when
an entry for one day gets added, all other entries in opened days would
also be rebuilt.

Now, the GlobalState will be emitted with an additional date, which
signals, which date caused the state change.
With this information, I selectively only build the EntryLists that
needs to be rebuilt.

Additionally, the calendar FAB will push a new route instead of
navigating to a new day by utilizing the pageController.
marco force-pushed fix-global-state from 292d8c1b50 to 983f3316e6 2025-01-12 16:23:20 +00:00 Compare
marco force-pushed fix-global-state from 983f3316e6 to 7728ec3b66 2025-01-12 16:24:21 +00:00 Compare
marco merged commit a3eb907a8e into master 2025-01-12 16:24:34 +00:00
marco deleted branch fix-global-state 2025-01-12 16:24:44 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: marco/calorimeter#11
No description provided.