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

_AnimatedButtonState#641e1(tickers: tracking 1 ticker) was disposed with an active Ticker. #13

Open
lucasw2025 opened this issue Oct 1, 2023 · 2 comments

Comments

@lucasw2025
Copy link

It seems that the Animation was not disposed:

_AnimatedButtonState created a Ticker via its TickerProviderStateMixin, but at the time dispose() was called on the mixin, that Ticker was still active. All Tickers must be disposed before calling super.dispose().

Tickers used by AnimationControllers should be disposed by calling dispose() on the AnimationController itself. Otherwise, the ticker will leak.

The offending ticker was: _WidgetTicker(created by _AnimatedButtonState#641e1)
The stack trace when the _WidgetTicker was actually created was:

To Reproduce
Steps to reproduce the behavior:

  1. Use the FlutterAnimatedButton to navigate to another page. I used GoRouter's context.goNamed

Expected behavior
It doesn't affect UI but it prints the Exception and memory may leak.

@Ahror97
Copy link

Ahror97 commented Jan 6, 2024

Same issue

@geanmartinezsh
Copy link

Same issue, any fix here?

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

No branches or pull requests

3 participants