aleksanderwozniak / table_calendar

Highly customizable, feature-packed calendar widget for Flutter
Apache License 2.0
1.81k stars 987 forks source link

Not rendering correctly when state managed by Bloc/Cubit updates state #797

Open adamzemmoura opened 1 year ago

adamzemmoura commented 1 year ago

I am using Bloc/Cubit for state management. When the state managed by a Cubit updates, there is a BlocBuilder that should cause a re-render of the TableCalendar. Other aspects of the UI update as expected so the BlocBuilder and state management are working. The TableCalendar, for some reason, does not draw the day cells. I notice that the focused day is then out of sync ie. even though the header is showing the correct month and year, the focus day is showing the incorrect month and year with about a 6 month offset. It is essentially trying to build day cells of the wrong months. If I change the calendar format from 'month' to '2 weeks' and back, the day cells update and render as expected.

Any ideas?

yakeer commented 1 year ago

Something similar happens to be as well. I'm in a month view, and it shows me events of the next month.

I'm using Provider as state management.

battlecook commented 2 months ago

I have same problem