mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-18 19:56:32 -07:00
chore: Cleaned up side_navigaton_bar
This commit is contained in:
parent
bfa7607681
commit
fefd2d9ad9
1 changed files with 198 additions and 207 deletions
|
|
@ -72,13 +72,11 @@ class _SideNavigationBarState extends ConsumerState<SideNavigationBar> {
|
|||
color: Theme.of(context).colorScheme.surface.withValues(alpha: shouldExpand ? 0.95 : 0.85),
|
||||
width: shouldExpand ? expandedWidth : collapsedWidth,
|
||||
child: MouseRegion(
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
key: const Key('navigation_rail'),
|
||||
padding: padding.copyWith(right: 0, top: isDesktop ? padding.top : null),
|
||||
child: Column(
|
||||
spacing: 2,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 14),
|
||||
|
|
@ -95,9 +93,7 @@ class _SideNavigationBarState extends ConsumerState<SideNavigationBar> {
|
|||
? () => widget.scaffoldKey.currentState?.openDrawer()
|
||||
: () => setState(() => expandedSideBar = !expandedSideBar),
|
||||
icon: Icon(
|
||||
largeBar && expandedSideBar
|
||||
? IconsaxPlusLinear.sidebar_left
|
||||
: IconsaxPlusLinear.menu,
|
||||
largeBar && expandedSideBar ? IconsaxPlusLinear.sidebar_left : IconsaxPlusLinear.menu,
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
@ -112,10 +108,8 @@ class _SideNavigationBarState extends ConsumerState<SideNavigationBar> {
|
|||
],
|
||||
Expanded(
|
||||
child: Column(
|
||||
spacing: 2,
|
||||
mainAxisAlignment: !largeBar ? MainAxisAlignment.center : MainAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(height: 8),
|
||||
...widget.destinations.mapIndexed(
|
||||
(index, destination) => CustomTooltip(
|
||||
tooltipContent: expandedSideBar
|
||||
|
|
@ -298,15 +292,12 @@ class _SideNavigationBarState extends ConsumerState<SideNavigationBar> {
|
|||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (AdaptiveLayout.of(context).inputDevice == InputDevice.pointer) const SizedBox(height: 16),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue