diff --git a/lib/presentation/views/round_view.dart b/lib/presentation/views/round_view.dart index 1e02cc3..b4d2212 100644 --- a/lib/presentation/views/round_view.dart +++ b/lib/presentation/views/round_view.dart @@ -73,13 +73,19 @@ class _RoundViewState extends State { resizeToAvoidBottomInset: false, navigationBar: CupertinoNavigationBar( transitionBetweenRoutes: true, - middle: Text(AppLocalizations.of(context).results), leading: CupertinoButton( padding: EdgeInsets.zero, onPressed: () => {LocalStorageService.saveGameSessions(), Navigator.pop(context)}, child: Text(AppLocalizations.of(context).cancel), ), + middle: Text(AppLocalizations.of(context).results), + trailing: widget.gameSession.isGameFinished + ? const Icon( + CupertinoIcons.lock, + size: 25, + ) + : null, ), child: Stack( children: [ @@ -293,21 +299,22 @@ class _RoundViewState extends State { : null, child: Text(AppLocalizations.of(context).done), ), - CupertinoButton( - onPressed: _areRoundInputsValid() - ? () { - _finishRound(); - LocalStorageService.saveGameSessions(); - if (widget.gameSession.isGameFinished == true) { - Navigator.pop(context); - } else { - Navigator.pop( - context, widget.roundNumber + 1); + if (!widget.gameSession.isGameFinished) + CupertinoButton( + onPressed: _areRoundInputsValid() + ? () { + _finishRound(); + LocalStorageService.saveGameSessions(); + if (widget.gameSession.isGameFinished) { + Navigator.pop(context); + } else { + Navigator.pop( + context, widget.roundNumber + 1); + } } - } - : null, - child: Text(AppLocalizations.of(context).next_round), - ), + : null, + child: Text(AppLocalizations.of(context).next_round), + ), ], ), ); diff --git a/pubspec.yaml b/pubspec.yaml index 12dae39..8e8a264 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: cabo_counter description: "Mobile app for the card game Cabo" publish_to: 'none' -version: 0.4.2+473 +version: 0.4.3+476 environment: sdk: ^3.5.4