Skip to content

Commit 205765d

Browse files
committed
revised on tap logic causing to ignore conditional statements
1 parent ca1d00b commit 205765d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/flutter_switch.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ class _FlutterSwitchState extends State<FlutterSwitch>
210210
return GestureDetector(
211211
onTap: () {
212212
if (widget.value)
213-
_animationController.reverse();
214-
else
215213
_animationController.forward();
214+
else
215+
_animationController.reverse();
216216

217217
widget.onToggle(!widget.value);
218218
},

0 commit comments

Comments
 (0)