We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent daebe97 commit 427c5aeCopy full SHA for 427c5ae
lib/router/router.dart
@@ -606,6 +606,22 @@ GoRouter createRouter({
606
child: Center(child: Text('SAVED HEADLINES PAGE')),
607
);
608
},
609
+ routes: [
610
+ GoRoute(
611
+ path: Routes.accountArticleDetails, // 'article/:id'
612
+ name: Routes.accountArticleDetailsName,
613
+ builder: (context, state) {
614
+ final id = state.pathParameters['id']!;
615
+ return BlocProvider(
616
+ create: (context) => HeadlineDetailsBloc(
617
+ headlinesRepository:
618
+ context.read<HtDataRepository<Headline>>(),
619
+ )..add(HeadlineDetailsRequested(headlineId: id)),
620
+ child: HeadlineDetailsPage(headlineId: id),
621
+ );
622
+ },
623
+ ),
624
+ ],
625
),
626
],
627
0 commit comments