Skip to content

Commit ca6eabe

Browse files
committed
refactor(content): add description to page header
- Added description text - Updated padding values
1 parent aaef5eb commit ca6eabe

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

lib/content_management/view/content_management_page.dart

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import 'package:ht_dashboard/content_management/view/categories_page.dart';
33
import 'package:ht_dashboard/content_management/view/headlines_page.dart';
44
import 'package:ht_dashboard/content_management/view/sources_page.dart';
55
import 'package:ht_dashboard/l10n/l10n.dart';
6+
import 'package:ht_dashboard/shared/constants/app_spacing.dart';
7+
import 'package:ht_dashboard/shared/theme/app_theme.dart';
68

79
/// {@template content_management_page}
810
/// A page for Content Management with tabbed navigation for sub-sections.
@@ -37,13 +39,35 @@ class _ContentManagementPageState extends State<ContentManagementPage>
3739
return Scaffold(
3840
appBar: AppBar(
3941
title: Text(l10n.contentManagement),
40-
bottom: TabBar(
41-
controller: _tabController,
42-
tabs: [
43-
Tab(text: l10n.headlines),
44-
Tab(text: l10n.categories),
45-
Tab(text: l10n.sources),
46-
],
42+
bottom: PreferredSize(
43+
preferredSize: Size.fromHeight(
44+
kToolbarHeight + kTextTabBarHeight + AppSpacing.lg,
45+
),
46+
child: Column(
47+
children: [
48+
Padding(
49+
padding: const EdgeInsets.only(
50+
left: AppSpacing.lg,
51+
right: AppSpacing.lg,
52+
bottom: AppSpacing.lg,
53+
),
54+
child: Text(
55+
l10n.contentManagementPageDescription,
56+
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
57+
color: Theme.of(context).colorScheme.onSurfaceVariant,
58+
),
59+
),
60+
),
61+
TabBar(
62+
controller: _tabController,
63+
tabs: [
64+
Tab(text: l10n.headlines),
65+
Tab(text: l10n.categories),
66+
Tab(text: l10n.sources),
67+
],
68+
),
69+
],
70+
),
4771
),
4872
),
4973
body: TabBarView(

0 commit comments

Comments
 (0)