fix: long press feedback on every call
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 47s
Pull Request Pipeline / lint (pull_request) Successful in 53s

This commit is contained in:
2026-05-13 13:48:44 +02:00
parent 02bb7e4daa
commit f5fbb3ecc4

View File

@@ -70,11 +70,14 @@ class _MainMenuButtonState extends State<MainMenuButton>
const Duration(milliseconds: 400),
() async {
_isLongPressing = true;
await HapticFeedback.vibrate();
widget.onLongPressed?.call();
await HapticFeedback.heavyImpact();
_repeatTimer = Timer.periodic(
const Duration(milliseconds: 250),
(_) => widget.onLongPressed?.call(),
(_) async {
widget.onLongPressed?.call();
await HapticFeedback.heavyImpact();
},
);
},
);