@@ -19,6 +19,7 @@ import 'package:ht_main/authentication/bloc/authentication_bloc.dart';
19
19
import 'package:ht_main/authentication/view/authentication_page.dart' ;
20
20
import 'package:ht_main/authentication/view/email_code_verification_page.dart' ;
21
21
import 'package:ht_main/authentication/view/request_code_page.dart' ;
22
+ import 'package:ht_main/entity_details/view/entity_details_page.dart' ; // Added
22
23
import 'package:ht_main/headline-details/bloc/headline_details_bloc.dart' ; // Re-added
23
24
import 'package:ht_main/headline-details/bloc/similar_headlines_bloc.dart' ; // Import SimilarHeadlinesBloc
24
25
import 'package:ht_main/headline-details/view/headline_details_page.dart' ;
@@ -291,6 +292,34 @@ GoRouter createRouter({
291
292
),
292
293
],
293
294
),
295
+ // --- Entity Details Routes (Top Level) ---
296
+ GoRoute (
297
+ path: Routes .categoryDetails,
298
+ name: Routes .categoryDetailsName,
299
+ builder: (context, state) {
300
+ final args = state.extra as EntityDetailsPageArguments ? ;
301
+ if (args == null ) {
302
+ // Handle missing arguments, perhaps redirect or show error
303
+ return const Scaffold (
304
+ body: Center (child: Text ('Error: Missing category details arguments' )),
305
+ );
306
+ }
307
+ return EntityDetailsPage (args: args);
308
+ },
309
+ ),
310
+ GoRoute (
311
+ path: Routes .sourceDetails,
312
+ name: Routes .sourceDetailsName,
313
+ builder: (context, state) {
314
+ final args = state.extra as EntityDetailsPageArguments ? ;
315
+ if (args == null ) {
316
+ return const Scaffold (
317
+ body: Center (child: Text ('Error: Missing source details arguments' )),
318
+ );
319
+ }
320
+ return EntityDetailsPage (args: args);
321
+ },
322
+ ),
294
323
// --- Main App Shell ---
295
324
StatefulShellRoute .indexedStack (
296
325
builder: (context, state, navigationShell) {
0 commit comments