Added delay before reversing animation
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user