_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:
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.
It seems that the Animation was not disposed:
To Reproduce Steps to reproduce the behavior:
Expected behavior It doesn't affect UI but it prints the Exception and memory may leak.