diff --git a/lib/another_xlider.dart b/lib/another_xlider.dart index 604c378..3f717a0 100644 --- a/lib/another_xlider.dart +++ b/lib/another_xlider.dart @@ -1716,13 +1716,13 @@ class FlutterSliderState extends State with TickerProviderStateMi void _stopHandlerAnimation({Animation? animation, AnimationController? controller}) { if (widget.handlerAnimation.reverseCurve != null) { - if (animation!.isCompleted) { - controller!.reverse(); + if (animation?.isCompleted ?? false) { + controller?.reverse(); } else { - controller!.reset(); + controller?.reset(); } } else { - controller!.reset(); + controller?.reset(); } }