Added delay before reversing animation

This commit is contained in:
2026-05-04 15:01:22 +02:00
parent 3dfd2c7c08
commit e25a2bde69

View File

@@ -53,10 +53,11 @@ class _MainMenuButtonState extends State<MainMenuButton>
_animationController.forward(); _animationController.forward();
}, },
onTapUp: (_) async { onTapUp: (_) async {
await _animationController.reverse();
if (mounted) { if (mounted) {
widget.onPressed(); widget.onPressed();
} }
await Future.delayed(const Duration(milliseconds: 100));
await _animationController.reverse();
}, },
onTapCancel: () { onTapCancel: () {
_animationController.reverse(); _animationController.reverse();