From 74148aed8a1676522198e1f79bbe61858bb69f82 Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Fri, 2 May 2025 23:31:28 +0200 Subject: [PATCH] Added rootNavigator attribute to fullscreenDialog above the tab bar --- lib/views/active_game_view.dart | 5 +++-- lib/views/round_view.dart | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/views/active_game_view.dart b/lib/views/active_game_view.dart index 85d5a70..b1dc0eb 100644 --- a/lib/views/active_game_view.dart +++ b/lib/views/active_game_view.dart @@ -82,8 +82,9 @@ class _ActiveGameViewState extends State { style: TextStyle(fontSize: 22)), onTap: () async { // ignore: unused_local_variable - final val = await Navigator.push( - context, + final val = + await Navigator.of(context, rootNavigator: true) + .push( CupertinoPageRoute( fullscreenDialog: true, builder: (context) => RoundView( diff --git a/lib/views/round_view.dart b/lib/views/round_view.dart index 9a5a035..0949037 100644 --- a/lib/views/round_view.dart +++ b/lib/views/round_view.dart @@ -293,8 +293,8 @@ class _RoundViewState extends State { if (widget.gameSession.isGameFinished == true) { Navigator.pop(context, widget.gameSession); } else { - Navigator.pushReplacement( - context, + Navigator.of(context, rootNavigator: true) + .pushReplacement( CupertinoPageRoute( builder: (context) => RoundView( gameSession: widget.gameSession,