Implemented openRoundView method

This commit is contained in:
2025-07-08 21:41:38 +02:00
parent 38eeb338b6
commit 1683a8464b
3 changed files with 27 additions and 23 deletions

View File

@@ -290,7 +290,7 @@ class _RoundViewState extends State<RoundView> {
? () {
_finishRound();
LocalStorageService.saveGameSessions();
Navigator.pop(context, widget.gameSession);
Navigator.pop(context, -1);
}
: null,
child: Text(AppLocalizations.of(context).done),
@@ -301,17 +301,10 @@ class _RoundViewState extends State<RoundView> {
_finishRound();
LocalStorageService.saveGameSessions();
if (widget.gameSession.isGameFinished == true) {
Navigator.pop(context, widget.gameSession);
Navigator.pop(context, -1);
} else {
Navigator.of(context, rootNavigator: true)
.pushReplacement(
CupertinoPageRoute(
builder: (context) => RoundView(
gameSession: widget.gameSession,
roundNumber: widget.roundNumber + 1,
),
),
);
Navigator.pop(
context, widget.roundNumber + 1);
}
}
: null,