Skip to content

Commit

Permalink
Merge pull request #32 from john-paradym/fix-stopHandlerAnimation-cra…
Browse files Browse the repository at this point in the history
…shes

Handle null animation or controller in _stopHandlerAnimation function
  • Loading branch information
loonix authored Nov 23, 2023
2 parents 9411ebf + da2744c commit 39c6472
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/another_xlider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1716,13 +1716,13 @@ class FlutterSliderState extends State<FlutterSlider> 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();
}
}

Expand Down

0 comments on commit 39c6472

Please sign in to comment.