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)), ], ), );