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

setState() called after dispose() #98

Open
giantss opened this issue May 20, 2024 · 2 comments
Open

setState() called after dispose() #98

giantss opened this issue May 20, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@giantss
Copy link

giantss commented May 20, 2024

I'm using google_nav_bar: ^5.0.6 and I found this error through Firebase Crashlytics backend.

The error message is as follows:

Fatal Exception: FlutterError
setState() called after dispose(): _GNavState#90a59(lifecycle state: defunct, not mounted) This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback. The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree. This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose().

image image
@sooxt98 sooxt98 added the enhancement New feature or request label Aug 7, 2024
@sooxt98
Copy link
Owner

sooxt98 commented Oct 29, 2024

try out 5.0.7 to see if the issue still happening #101

@giantss
Copy link
Author

giantss commented Oct 31, 2024

OK, I have updated the version. I will observe the next version online.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants