Updated navigation for creating a game

This commit is contained in:
2025-08-17 20:33:54 +02:00
parent cd3ac1f0f9
commit 354922b93d
2 changed files with 7 additions and 5 deletions

View File

@@ -221,7 +221,7 @@ class _ActiveGameViewState extends State<ActiveGameView> {
backgroundColorActivated:
CustomTheme.backgroundColor,
onTap: () {
Navigator.pushReplacement(
Navigator.push(
context,
CupertinoPageRoute(
builder: (_) => CreateGameView(

View File

@@ -452,10 +452,12 @@ class _CreateGameViewState extends State<CreateGameView> {
gameManager.addGameSession(gameSession);
final session = gameManager.getGameSessionById(id) ?? gameSession;
Navigator.pushReplacement(
Navigator.pushAndRemoveUntil(
context,
CupertinoPageRoute(
builder: (context) => ActiveGameView(gameSession: session)));
builder: (context) => ActiveGameView(gameSession: session)),
(Route<dynamic> route) => route.isFirst,
);
}
@override