From 7c0e000c052a035d6d33d137a9374f3e09adad2a Mon Sep 17 00:00:00 2001 From: "Michael W. Aziz" Date: Sat, 18 May 2024 12:33:22 +0300 Subject: [PATCH] [FIX] Taps in the switcher --- lib/src/Toggles/Switcher/switcher.toggle.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/Toggles/Switcher/switcher.toggle.dart b/lib/src/Toggles/Switcher/switcher.toggle.dart index a2152ba..6befaad 100644 --- a/lib/src/Toggles/Switcher/switcher.toggle.dart +++ b/lib/src/Toggles/Switcher/switcher.toggle.dart @@ -140,7 +140,7 @@ class AstromicSwitcherToggleState extends State { //S1 -- Label Spacing if (widget.withLabel!) SizedBox(width: widget.style(widget.isEnabled!, _currentState).labelSpacing), //S1 -- Label - if (widget.withLabel! && widget.label != null) GestureDetector(onTap: widget.isLabelTapable! ? _onTap(!_currentState) : null, child: widget.label!(widget.isEnabled!, _currentState)), + if (widget.withLabel! && widget.label != null) GestureDetector(onTap: widget.isLabelTapable! ? () => _onTap(!_currentState) : null, child: widget.label!(widget.isEnabled!, _currentState)), ], ), );