imujtaba8488 / package_im_stepper

A growing collection of beautiful, easy to use, stepper and page indicator widgets.
https://pub.dev/packages/im_stepper
BSD 3-Clause "New" or "Revised" License
148 stars 65 forks source link

Dispose AnimationController before its parent #6

Closed mattbreeland closed 3 years ago

mattbreeland commented 3 years ago

Otherwise this exception happens: Exception has occurred. FlutterError (_OpacityAnimatedState#aa454(ticker active) was disposed with an active Ticker. _OpacityAnimatedState created a Ticker via its SingleTickerProviderStateMixin, but at the time dispose() was called on the mixin, that Ticker was still active. The Ticker 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: Ticker(created by _OpacityAnimatedState#aa454(lifecycle state: created))