|
| 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