@@ -25,42 +25,12 @@ class AppShell extends StatelessWidget {
2525 @override
2626 Widget build (BuildContext context) {
2727 final l10n = AppLocalizationsX (context).l10n;
28+ final theme = Theme .of (context);
29+
30+ // Use the same text style as the NavigationRail labels for consistency.
31+ final navRailLabelStyle = theme.textTheme.labelMedium;
32+
2833 return Scaffold (
29- appBar: AppBar (
30- title: Text (l10n.dashboardTitle),
31- actions: [
32- PopupMenuButton <String >(
33- onSelected: (value) {
34- if (value == 'settings' ) {
35- context.goNamed (Routes .settingsName);
36- } else if (value == 'signOut' ) {
37- context.read <AppBloc >().add (const AppLogoutRequested ());
38- }
39- },
40- itemBuilder: (BuildContext context) => < PopupMenuEntry <String >> [
41- PopupMenuItem <String >(
42- value: 'settings' ,
43- child: Text (l10n.settings),
44- ),
45- PopupMenuItem <String >(
46- value: 'signOut' ,
47- child: Text (l10n.signOut),
48- ),
49- ],
50- child: Padding (
51- padding: const EdgeInsets .all (AppSpacing .sm),
52- child: CircleAvatar (
53- backgroundColor: Theme .of (context).colorScheme.primaryContainer,
54- child: Icon (
55- Icons .person,
56- color: Theme .of (context).colorScheme.onPrimaryContainer,
57- ),
58- ),
59- ),
60- ),
61- const SizedBox (width: AppSpacing .sm),
62- ],
63- ),
6434 body: AdaptiveScaffold (
6535 selectedIndex: navigationShell.currentIndex,
6636 onSelectedIndexChange: (index) {
@@ -86,6 +56,104 @@ class AppShell extends StatelessWidget {
8656 label: l10n.appConfiguration,
8757 ),
8858 ],
59+ leadingUnextendedNavRail: const Padding (
60+ padding: EdgeInsets .symmetric (vertical: AppSpacing .lg),
61+ child: Icon (Icons .newspaper_outlined),
62+ ),
63+ leadingExtendedNavRail: Padding (
64+ padding: const EdgeInsets .all (AppSpacing .lg),
65+ child: Row (
66+ children: [
67+ const Icon (Icons .newspaper_outlined),
68+ const SizedBox (width: AppSpacing .md),
69+ Text (
70+ l10n.dashboardTitle,
71+ style: theme.textTheme.titleLarge? .copyWith (
72+ color: theme.colorScheme.primary,
73+ ),
74+ ),
75+ ],
76+ ),
77+ ),
78+ trailingNavRail: Builder (
79+ builder: (context) {
80+ final isExtended =
81+ Breakpoints .mediumLarge.isActive (context) ||
82+ Breakpoints .small.isActive (context);
83+ return Expanded (
84+ child: Padding (
85+ padding: const EdgeInsets .only (bottom: AppSpacing .lg),
86+ child: Column (
87+ mainAxisAlignment: MainAxisAlignment .end,
88+ children: [
89+ // Settings Tile
90+ InkWell (
91+ onTap: () => context.goNamed (Routes .settingsName),
92+ child: Padding (
93+ padding: EdgeInsets .symmetric (
94+ vertical: AppSpacing .md,
95+ horizontal: isExtended ? 24 : 16 ,
96+ ),
97+ child: Row (
98+ mainAxisAlignment: isExtended
99+ ? MainAxisAlignment .start
100+ : MainAxisAlignment .center,
101+ children: [
102+ Icon (
103+ Icons .settings_outlined,
104+ color: theme.colorScheme.onSurfaceVariant,
105+ size: 24 ,
106+ ),
107+ if (isExtended) ...[
108+ const SizedBox (width: AppSpacing .lg),
109+ Text (
110+ l10n.settings,
111+ style: navRailLabelStyle,
112+ ),
113+ ],
114+ ],
115+ ),
116+ ),
117+ ),
118+ // Sign Out Tile
119+ InkWell (
120+ onTap: () => context.read <AppBloc >().add (
121+ const AppLogoutRequested (),
122+ ),
123+ child: Padding (
124+ padding: EdgeInsets .symmetric (
125+ vertical: AppSpacing .md,
126+ horizontal: isExtended ? 24 : 16 ,
127+ ),
128+ child: Row (
129+ mainAxisAlignment: isExtended
130+ ? MainAxisAlignment .start
131+ : MainAxisAlignment .center,
132+ children: [
133+ Icon (
134+ Icons .logout,
135+ color: theme.colorScheme.error,
136+ size: 24 ,
137+ ),
138+ if (isExtended) ...[
139+ const SizedBox (width: AppSpacing .lg),
140+ Text (
141+ l10n.signOut,
142+ style: navRailLabelStyle? .copyWith (
143+ color: theme.colorScheme.error,
144+ ),
145+ ),
146+ ],
147+ ],
148+ ),
149+ ),
150+ ),
151+ ],
152+ ),
153+ ),
154+ );
155+ },
156+ ),
89157 body: (_) => Padding (
90158 padding: const EdgeInsets .fromLTRB (
91159 0 ,
0 commit comments