@@ -61,13 +61,13 @@ class _AnimationTypeHoverBuilderState<T, V>
6161 StyledToggleProperties (value: values[index2], index: index2)),
6262 pos - pos.floor (),
6363 );
64- final unlistedDoubleValue = isListed ? 0.0 : 1.0 ;
65- return TweenAnimationBuilder < double >(
66- duration : widget.indicatorAppearingDuration,
67- curve : widget.indicatorAppearingCurve ,
68- tween : Tween (begin : unlistedDoubleValue, end : unlistedDoubleValue),
69- builder : (context, unlistedDoubleValue, _) {
70- if (unlistedDoubleValue == 0 .0 ) {
64+ final indicatorAppearingAnimation =
65+ widget.properties._indicatorAppearingAnimation;
66+ return AnimatedBuilder (
67+ animation : indicatorAppearingAnimation ,
68+ builder : (context, _) {
69+ final appearingValue = indicatorAppearingAnimation.value;
70+ if (appearingValue >= 1 .0 ) {
7171 return _EmptyWidget (
7272 key: _builderKey, child: widget.builder (listedValueFunction ()));
7373 }
@@ -81,10 +81,10 @@ class _AnimationTypeHoverBuilderState<T, V>
8181 builder: (context, unlistedValue, _) {
8282 return _EmptyWidget (
8383 key: _builderKey,
84- child: widget.builder (unlistedDoubleValue == 1 .0
84+ child: widget.builder (appearingValue <= 0 .0
8585 ? unlistedValue
86- : widget.lerp (listedValueFunction (), unlistedValue,
87- unlistedDoubleValue )),
86+ : widget.lerp (
87+ unlistedValue, listedValueFunction (), appearingValue )),
8888 );
8989 });
9090 },
0 commit comments