From 143a41588f0effc1429161596ff998f381f0dfa4 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Sat, 22 Mar 2025 10:57:46 -0500 Subject: [PATCH] fix --- web/repertory/lib/screens/auth_screen.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/repertory/lib/screens/auth_screen.dart b/web/repertory/lib/screens/auth_screen.dart index 33c8051e..cad70f6e 100644 --- a/web/repertory/lib/screens/auth_screen.dart +++ b/web/repertory/lib/screens/auth_screen.dart @@ -26,7 +26,15 @@ class _AuthScreenState extends State { body: Consumer( builder: (context, auth, _) { if (auth.authenticated) { - Navigator.of(context).pushReplacementNamed('/'); + Future.delayed(Duration(milliseconds: 1), () { + if (constants.navigatorKey.currentContext == null) { + return; + } + + Navigator.of( + constants.navigatorKey.currentContext!, + ).pushNamedAndRemoveUntil('/', (Route route) => false); + }); return SizedBox.shrink(); }