table_calendar
table_calendar copied to clipboard
Not rendering correctly when state managed by Bloc/Cubit updates state
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?
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.
I have same problem