halilozercan / ProgressButton

A Flutter Material Button that animates between Progress and Error states
Other
132 stars 12 forks source link

Potential memory leak from Animation Controllers #7

Closed david-shortman closed 3 years ago

david-shortman commented 4 years ago
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown while finalizing the widget tree:
_ProgressButtonState#99899(tickers: tracking 2 tickers) was disposed with an active Ticker.

...

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

When disposing of a widget that contains a button actively being animated, the above error appears.

This widget should dispose of its AnimationControllers itself.