File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class _RollingWidgetAnimationState extends State<RollingWidgetAnimation> {
3636 .animate (
3737 trigger: counter,
3838 curve: Curves .easeInOutQuart,
39- duration: Duration (milliseconds: 500 ),
39+ duration: const Duration (milliseconds: 500 ),
4040 ),
4141 ),
4242 ElevatedButton (
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ class _PointerTransitionState extends State<PointerTransition>
135135 duration: widget.duration,
136136 );
137137
138- late Animation < double > _animation = CurvedAnimation (
138+ late CurvedAnimation _animation = CurvedAnimation (
139139 parent: _controller,
140140 curve: widget.curve,
141141 );
@@ -187,6 +187,7 @@ class _PointerTransitionState extends State<PointerTransition>
187187 }
188188
189189 if (widget.curve != oldWidget.curve) {
190+ _animation.dispose ();
190191 _animation = CurvedAnimation (
191192 parent: _controller,
192193 curve: widget.curve,
@@ -206,6 +207,7 @@ class _PointerTransitionState extends State<PointerTransition>
206207
207208 @override
208209 void dispose () {
210+ _animation.dispose ();
209211 _controller.removeListener (animationListener);
210212 _controller.dispose ();
211213 WidgetsBinding .instance.pointerRouter.removeGlobalRoute (updateState);
You can’t perform that action at this time.
0 commit comments