NikhilVadoliya / FlutterAnimatedButton

A flutter package project which contains a collection of cool and beautiful button animations. :rocket:
https://pub.dev/packages/flutter_animated_button
MIT License
27 stars 9 forks source link

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

Open lucasw2025 opened 1 year ago

lucasw2025 commented 1 year ago

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 commented 10 months ago

Same issue

geanmartinezsh commented 6 months ago

Same issue, any fix here?