Skip to content

Commit 15db333

Browse files
committed
🔧 Update Pack 2 #2
1 parent cf93c65 commit 15db333

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

example/lib/stories/rolling_widget_animation.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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(

lib/src/pointer_transition.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)