File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -89,12 +89,24 @@ GoRouter createRouter({
89
89
' AppStatus: $appStatus ' ,
90
90
);
91
91
92
- // --- Define Key Paths ---
93
92
const rootPath = '/' ;
94
93
const authenticationPath = Routes .authentication;
95
94
const feedPath = Routes .feed;
96
95
final isGoingToAuth = currentLocation.startsWith (authenticationPath);
97
96
97
+ // --- Workaround for Demo Environment ---
98
+ // In the demo environment, the initial auth state from the in-memory
99
+ // client might not be emitted before the first redirect check. If the app
100
+ // is still in the `initial` state, we explicitly redirect to the
101
+ // authentication page to begin the demo flow, avoiding the black screen.
102
+ if (appStatus == AppStatus .initial &&
103
+ environment == local_config.AppEnvironment .demo) {
104
+ print (
105
+ ' Redirect (Workaround): In demo mode with initial status. Forcing to authentication.' ,
106
+ );
107
+ return authenticationPath;
108
+ }
109
+
98
110
// With the new App startup architecture, the router is only active when
99
111
// the app is in a stable, running state. The `redirect` function's
100
112
// only responsibility is to handle auth-based route protection.
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ packages:
72
72
description:
73
73
path: "."
74
74
ref: HEAD
75
- resolved-ref: f48dc0555b1a28ed3c51215f3a93403dbbc46ea0
75
+ resolved-ref: "9c25c6bff76c554e5220368536fcb9370758f48f"
76
76
url: "https://github.com/flutter-news-app-full-source-code/auth-inmemory.git"
77
77
source: git
78
78
version: "0.0.0"
@@ -178,7 +178,7 @@ packages:
178
178
description:
179
179
path: "."
180
180
ref: HEAD
181
- resolved-ref: "7a1b54f8c0f94f6c04af3404c8110181e080b5c4"
181
+ resolved-ref: f648500814ec636a2930498756029d29b363194a
182
182
url: "https://github.com/flutter-news-app-full-source-code/core.git"
183
183
source: git
184
184
version: "0.0.0"
@@ -426,10 +426,10 @@ packages:
426
426
dependency: "direct main"
427
427
description:
428
428
name: go_router
429
- sha256: c489908a54ce2131f1d1b7cc631af9c1a06fac5ca7c449e959192089f9489431
429
+ sha256: "8b1f37dfaf6e958c6b872322db06f946509433bec3de753c3491a42ae9ec2b48"
430
430
url: "https://pub.dev"
431
431
source: hosted
432
- version: "16.0 .0"
432
+ version: "16.1 .0"
433
433
google_fonts:
434
434
dependency: "direct main"
435
435
description:
You can’t perform that action at this time.
0 commit comments