Merge remote-tracking branch 'origin/feature/215-haptisches-feedback-hinzufügen' into feature/215-haptisches-feedback-hinzufügen
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 47s
Pull Request Pipeline / lint (pull_request) Successful in 54s

This commit is contained in:
2026-05-13 15:38:24 +02:00
2 changed files with 6 additions and 3 deletions

View File

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

View File

@@ -61,7 +61,7 @@ class GameTile extends StatelessWidget {
} }
}, },
onLongPress: () async { onLongPress: () async {
await HapticFeedback.vibrate(); await HapticFeedback.heavyImpact();
if (onLongPress != null) { if (onLongPress != null) {
onLongPress!.call(); onLongPress!.call();
} }