diff --git a/lib/src/Toggles/Switcher/switcher.toggle.dart b/lib/src/Toggles/Switcher/switcher.toggle.dart index be38fc3..5776711 100644 --- a/lib/src/Toggles/Switcher/switcher.toggle.dart +++ b/lib/src/Toggles/Switcher/switcher.toggle.dart @@ -87,14 +87,16 @@ class AstromicSwitcherToggleState extends State { //SECTION - Action Callbacks Future _onTap(bool newValue) async { - if (widget.onStateChanged != null) { - _currentState = await widget.onStateChanged!(_currentState); - } else { - _currentState = newValue; - } setState(() { - // + _currentState = newValue; }); + + if (widget.onStateChanged != null) { + bool shouldRevert = await widget.onStateChanged!(_currentState); + setState(() { + _currentState = shouldRevert; + }); + } } //!SECTION