Skip to content

fix: setState Assertion Error in Calendar View#129

Merged
Leonavichus merged 1 commit intodarkmoonight:mainfrom
r4khul:bugfixes
Feb 3, 2026
Merged

fix: setState Assertion Error in Calendar View#129
Leonavichus merged 1 commit intodarkmoonight:mainfrom
r4khul:bugfixes

Conversation

@r4khul
Copy link
Copy Markdown
Contributor

@r4khul r4khul commented Feb 3, 2026

bug:
setState accepts a sync callback, but here it was a async callback - so flutter will ping it as a assertion error
[so basically clicking the chip will not perform anything]

log: Another exception was thrown: setState() callback argument returned a Future.

fix:

  • called the async func before hand & and then used setState to revalidate for the next build
  • plus moved the switch case outside of the async - so we can have a optimistic ui update - while the func takes its time to write to isar

@Leonavichus Leonavichus merged commit b992824 into darkmoonight:main Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants