From cddcb9ca2f17ccf4efee91f97dc08321247baec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kl=C3=BCpfel?= Date: Tue, 9 Apr 2024 16:27:35 +0200 Subject: [PATCH 1/2] 58: fixes transparent background color --- lib/src/widgets/animated_toggle_switch.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/widgets/animated_toggle_switch.dart b/lib/src/widgets/animated_toggle_switch.dart index 7a06803..49c8475 100644 --- a/lib/src/widgets/animated_toggle_switch.dart +++ b/lib/src/widgets/animated_toggle_switch.dart @@ -1114,7 +1114,9 @@ class AnimatedToggleSwitch _BaseToggleStyle._lerpFunction(styleAnimationType), (style) => DecoratedBox( decoration: BoxDecoration( - color: style._backgroundColor?.value, + color: style._backgroundGradient != null + ? null + : style._backgroundColor?.value, gradient: style._backgroundGradient?.value, borderRadius: style._borderRadius?.value, boxShadow: style._boxShadow?.value, From aa7ca603b5ba84f325c83987d4ffe93e8fffd088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kl=C3=BCpfel?= Date: Tue, 9 Apr 2024 16:31:30 +0200 Subject: [PATCH 2/2] 58: fixes transparent indicator color --- lib/src/widgets/animated_toggle_switch.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/widgets/animated_toggle_switch.dart b/lib/src/widgets/animated_toggle_switch.dart index 49c8475..0b1311f 100644 --- a/lib/src/widgets/animated_toggle_switch.dart +++ b/lib/src/widgets/animated_toggle_switch.dart @@ -1274,7 +1274,9 @@ class AnimatedToggleSwitch return DecoratedBox( key: AnimatedToggleSwitchTestKeys.indicatorDecoratedBoxKey, decoration: BoxDecoration( - color: style._indicatorColor?.value, + color: style._indicatorGradient != null + ? null + : style._indicatorColor?.value, gradient: style._indicatorGradient?.value, borderRadius: style._indicatorBorderRadius?.value, border: style._indicatorBorder?.value,