Fixed bug with playing confetti on cancel button

This commit is contained in:
2025-07-23 11:26:09 +02:00
parent 016dd3159a
commit fadc99564f
3 changed files with 4 additions and 2 deletions

View File

@@ -453,6 +453,8 @@ class _ActiveGameViewState extends State<ActiveGameView> {
), ),
); );
if (round == -1) return;
if (widget.gameSession.isGameFinished && context.mounted) { if (widget.gameSession.isGameFinished && context.mounted) {
_playFinishAnimation(context); _playFinishAnimation(context);
} }

View File

@@ -80,7 +80,7 @@ class _RoundViewState extends State<RoundView> {
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
onPressed: () => { onPressed: () => {
LocalStorageService.saveGameSessions(), LocalStorageService.saveGameSessions(),
Navigator.pop(context) Navigator.pop(context, -1)
}, },
child: Text(AppLocalizations.of(context).cancel), child: Text(AppLocalizations.of(context).cancel),
), ),

View File

@@ -2,7 +2,7 @@ name: cabo_counter
description: "Mobile app for the card game Cabo" description: "Mobile app for the card game Cabo"
publish_to: 'none' publish_to: 'none'
version: 0.5.3+594 version: 0.5.3+595
environment: environment:
sdk: ^3.5.4 sdk: ^3.5.4