From b325776eed21be8d6e6fa95918c3a41428d5777b Mon Sep 17 00:00:00 2001 From: "Michael W. Aziz" Date: Sun, 25 Jan 2026 14:12:01 +0200 Subject: [PATCH] [FEAT] Dismiss handler for toggle --- lib/src/Toggles/Switcher/switcher.toggle.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/Toggles/Switcher/switcher.toggle.dart b/lib/src/Toggles/Switcher/switcher.toggle.dart index f1e89fd..be38fc3 100644 --- a/lib/src/Toggles/Switcher/switcher.toggle.dart +++ b/lib/src/Toggles/Switcher/switcher.toggle.dart @@ -86,7 +86,7 @@ class AstromicSwitcherToggleState extends State { } //SECTION - Action Callbacks - _onTap(bool newValue) async { + Future _onTap(bool newValue) async { if (widget.onStateChanged != null) { _currentState = await widget.onStateChanged!(_currentState); } else { @@ -137,7 +137,7 @@ class AstromicSwitcherToggleState extends State { inactiveIcon: _style.innerInactiveWidget, // padding: _style.togglePadding, - onToggle: !_config.isEnabled ? (bool v) {} : (bool s) => _onTap(s), + onToggle: !_config.isEnabled ? (bool v) {} : (bool s) async => await _onTap(s), ), //S1 -- Label Spacing if (_config.withLabel) SizedBox(width: _style.labelSpacing),