mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-16 10:46:00 -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),
|
color: Theme.of(context).colorScheme.surface.withValues(alpha: shouldExpand ? 0.95 : 0.85),
|
||||||
width: shouldExpand ? expandedWidth : collapsedWidth,
|
width: shouldExpand ? expandedWidth : collapsedWidth,
|
||||||
child: MouseRegion(
|
child: MouseRegion(
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
key: const Key('navigation_rail'),
|
key: const Key('navigation_rail'),
|
||||||
padding: padding.copyWith(right: 0, top: isDesktop ? padding.top : null),
|
padding: padding.copyWith(right: 0, top: isDesktop ? padding.top : null),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
spacing: 2,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 14),
|
padding: const EdgeInsets.symmetric(horizontal: 14),
|
||||||
|
|
@ -95,9 +93,7 @@ class _SideNavigationBarState extends ConsumerState<SideNavigationBar> {
|
||||||
? () => widget.scaffoldKey.currentState?.openDrawer()
|
? () => widget.scaffoldKey.currentState?.openDrawer()
|
||||||
: () => setState(() => expandedSideBar = !expandedSideBar),
|
: () => setState(() => expandedSideBar = !expandedSideBar),
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
largeBar && expandedSideBar
|
largeBar && expandedSideBar ? IconsaxPlusLinear.sidebar_left : IconsaxPlusLinear.menu,
|
||||||
? IconsaxPlusLinear.sidebar_left
|
|
||||||
: IconsaxPlusLinear.menu,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
@ -112,10 +108,8 @@ class _SideNavigationBarState extends ConsumerState<SideNavigationBar> {
|
||||||
],
|
],
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
spacing: 2,
|
|
||||||
mainAxisAlignment: !largeBar ? MainAxisAlignment.center : MainAxisAlignment.start,
|
mainAxisAlignment: !largeBar ? MainAxisAlignment.center : MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 8),
|
|
||||||
...widget.destinations.mapIndexed(
|
...widget.destinations.mapIndexed(
|
||||||
(index, destination) => CustomTooltip(
|
(index, destination) => CustomTooltip(
|
||||||
tooltipContent: expandedSideBar
|
tooltipContent: expandedSideBar
|
||||||
|
|
@ -298,15 +292,12 @@ class _SideNavigationBarState extends ConsumerState<SideNavigationBar> {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (AdaptiveLayout.of(context).inputDevice == InputDevice.pointer) const SizedBox(height: 16),
|
if (AdaptiveLayout.of(context).inputDevice == InputDevice.pointer) const SizedBox(height: 16),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue