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

[Bug]: Re-rendering issu for custom callbacks #42

Open
keremkurtulus opened this issue Sep 16, 2023 · 0 comments
Open

[Bug]: Re-rendering issu for custom callbacks #42

keremkurtulus opened this issue Sep 16, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@keremkurtulus
Copy link

Contact Details

No response

What happened?

While I was using onMonthChanged and onYearChanged callbacks with data fetching I realized that the calendar wasn't re-rendering. I printed the date value in that callback and I saw that always the previous selection has been displayed. I encountered this issue on Android, but I didn't test it on the IOS or any other devices. So I changed the calling ordering of callback methods in the event_calendar file such as here;

onMonthChanged: (int selectedMonth) {
-  widget.onMonthChanged?.call(EventCalendar.dateTime!);
  CalendarUtils.goToMonth(selectedMonth);
+  widget.onMonthChanged?.call(EventCalendar.dateTime!);
  setState(() {});
},

Looks like the re-rendering issue is fixed after applying those changes. Also I applied this into the onYearChanged part.

You can check the changes through my fork repo here
master...keremkurtulus:flutter_event_calendar:master

Also, I added Turkish language support for only the Georgian calendar type if you want to use it.

What type of Device are you seeing the problem on?

Android

@keremkurtulus keremkurtulus added the bug Something isn't working label Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants