Skip to content

Commit 0c43dc8

Browse files
committed
feat(content_management): add archived content page
- Create a new page for viewing and managing archived content - Implement a TabBar for navigating between archived headlines, topics, and sources - Add placeholder text for each tab section - TODO: Implement proper localization for the page title
1 parent a83aa11 commit 0c43dc8

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_bloc/flutter_bloc.dart';
3+
import 'package:flutter_news_app_web_dashboard_full_source_code/content_management/bloc/content_management_bloc.dart';
4+
import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart';
5+
import 'package:ui_kit/ui_kit.dart';
6+
7+
/// {@template archived_content_page}
8+
/// A page for viewing and managing archived content.
9+
/// {@endtemplate}
10+
class ArchivedContentPage extends StatefulWidget {
11+
/// {@macro archived_content_page}
12+
const ArchivedContentPage({super.key});
13+
14+
@override
15+
State<ArchivedContentPage> createState() => _ArchivedContentPageState();
16+
}
17+
18+
class _ArchivedContentPageState extends State<ArchivedContentPage>
19+
with SingleTickerProviderStateMixin {
20+
late TabController _tabController;
21+
22+
@override
23+
void initState() {
24+
super.initState();
25+
_tabController = TabController(length: 3, vsync: this);
26+
}
27+
28+
@override
29+
void dispose() {
30+
_tabController.dispose();
31+
super.dispose();
32+
}
33+
34+
@override
35+
Widget build(BuildContext context) {
36+
final l10n = AppLocalizationsX(context).l10n;
37+
return Scaffold(
38+
appBar: AppBar(
39+
title: Text('Archived Content'), // TODO(you): Will be fixed in l10n phase.
40+
bottom: TabBar(
41+
controller: _tabController,
42+
tabs: [
43+
Tab(text: l10n.headlines),
44+
Tab(text: l10n.topics),
45+
Tab(text: l10n.sources),
46+
],
47+
),
48+
),
49+
body: TabBarView(
50+
controller: _tabController,
51+
children: const [
52+
Center(child: Text('Archived Headlines View Placeholder')),
53+
Center(child: Text('Archived Topics View Placeholder')),
54+
Center(child: Text('Archived Sources View Placeholder')),
55+
],
56+
),
57+
);
58+
}
59+
}

0 commit comments

Comments
 (0)