diff --git a/lib/src/image/fade_widget.dart b/lib/src/image/fade_widget.dart index 75d143c..233d0ea 100644 --- a/lib/src/image/fade_widget.dart +++ b/lib/src/image/fade_widget.dart @@ -66,7 +66,11 @@ class _FadeWidgetState extends State hideWidget = false; if (widget.direction == AnimationDirection.reverse) { - opacity.addStatusListener(animationStatusChange); + if (widget.duration == Duration.zero) { + hideWidget = true; + } else { + opacity.addStatusListener(animationStatusChange); + } } } @@ -85,7 +89,11 @@ class _FadeWidgetState extends State hideWidget = false; if (widget.direction == AnimationDirection.reverse) { - opacity.addStatusListener(animationStatusChange); + if (widget.duration == Duration.zero) { + hideWidget = true; + } else { + opacity.addStatusListener(animationStatusChange); + } } }