octo_image icon indicating copy to clipboard operation
octo_image copied to clipboard

Fade transition not disposing child when duration is zero

Open AshishSingh2001 opened this issue 1 year ago • 0 comments

🐛 Bug Report

When we use FadeWidget with direction reverse and duration zero it is not disposing the child when the animation is completed.

The root cause of this issue is that animationController doesn't give callbacks to the listener when the duration is zero

Related Issue - https://github.com/Baseflow/flutter_cached_network_image/issues/942

Expected behavior

The widget should be disposed

Reproduction steps

We are able to reproduce this with the following code, where the blinkingRedDot widget never gets disposed

BlinkingRedDot is a inifnite is widget which blinks infinitely with a animation controller

   FadeWidget(
      child: BlinkingRedDot(),
      direction: AnimationDirection.reverse,
      duration: Duration(milliseconds: 0),
    );

Configuration

Version: 2.0.0

Platform:

  • [x] :iphone: iOS
  • [x] :robot: Android

AshishSingh2001 avatar Jul 04 '24 07:07 AshishSingh2001