♻️ Refactored nav completely

This commit is contained in:
2025-03-22 18:39:01 +08:00
parent 237abe564d
commit b4990308e9
10 changed files with 87 additions and 38 deletions

View File

@ -78,27 +78,29 @@ class _AppNavigationDrawerState extends State<AppNavigationDrawer> {
Expanded(
child: _DrawerContentList(),
),
Row(
spacing: 8,
children: nav.destinations.where((ele) => ele.isPinned).map(
(ele) {
return Expanded(
child: Tooltip(
message: ele.label.tr(),
child: IconButton.filledTonal(
icon: ele.icon,
color:
Theme.of(context).colorScheme.onPrimaryContainer,
onPressed: () {
GoRouter.of(context).goNamed(ele.screen);
Scaffold.of(context).closeDrawer();
},
if (cfg.hideBottomNav)
Row(
spacing: 8,
children: nav.destinations.where((ele) => ele.isPinned).map(
(ele) {
return Expanded(
child: Tooltip(
message: ele.label.tr(),
child: IconButton.filledTonal(
icon: ele.icon,
color: Theme.of(context)
.colorScheme
.onPrimaryContainer,
onPressed: () {
GoRouter.of(context).goNamed(ele.screen);
Scaffold.of(context).closeDrawer();
},
),
),
),
);
},
).toList(),
).padding(horizontal: 16),
);
},
).toList(),
).padding(horizontal: 16),
Align(
alignment: Alignment.bottomCenter,
child: ListTile(