Skip to content

Commit 0db0076

Browse files
committed
feat(router): add archived content page route
- Import ArchivedContentPage in router.dart - Add new GoRoute for archived content page - Define routes for archived content in routes.dart
1 parent c800880 commit 0db0076

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/router/router.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import 'package:flutter_news_app_web_dashboard_full_source_code/content_manageme
1717
import 'package:flutter_news_app_web_dashboard_full_source_code/content_management/view/edit_headline_page.dart';
1818
import 'package:flutter_news_app_web_dashboard_full_source_code/content_management/view/edit_source_page.dart';
1919
import 'package:flutter_news_app_web_dashboard_full_source_code/content_management/view/edit_topic_page.dart';
20+
import 'package:flutter_news_app_web_dashboard_full_source_code/content_management/view/archived_content_page.dart';
2021
import 'package:flutter_news_app_web_dashboard_full_source_code/dashboard/view/dashboard_page.dart';
2122
import 'package:flutter_news_app_web_dashboard_full_source_code/router/routes.dart';
2223
import 'package:flutter_news_app_web_dashboard_full_source_code/settings/view/settings_page.dart';
@@ -196,6 +197,11 @@ GoRouter createRouter({
196197
return EditSourcePage(sourceId: id);
197198
},
198199
),
200+
GoRoute(
201+
path: Routes.archivedContent,
202+
name: Routes.archivedContentName,
203+
builder: (context, state) => const ArchivedContentPage(),
204+
),
199205
],
200206
),
201207
],

lib/router/routes.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ abstract final class Routes {
4444
/// The name for the content management section route.
4545
static const String contentManagementName = 'contentManagement';
4646

47+
/// The path for the archived content page.
48+
static const String archivedContent = 'archived-content';
49+
50+
/// The name for the archived content page route.
51+
static const String archivedContentName = 'archivedContent';
52+
4753
/// The path for creating a new headline.
4854
static const String createHeadline = 'create-headline';
4955

0 commit comments

Comments
 (0)