mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
fix: Removed fladder and added "navigation" text to expanded side bar
This commit is contained in:
parent
f0216fa799
commit
fd3c97a214
1 changed files with 28 additions and 26 deletions
|
|
@ -48,7 +48,6 @@ class _SideNavigationBarState extends ConsumerState<SideNavigationBar> {
|
||||||
bool expandedSideBar = false;
|
bool expandedSideBar = false;
|
||||||
bool showOnHover = false;
|
bool showOnHover = false;
|
||||||
Timer? timer;
|
Timer? timer;
|
||||||
double currentWidth = 80;
|
|
||||||
|
|
||||||
void startTimer() {
|
void startTimer() {
|
||||||
timer?.cancel();
|
timer?.cancel();
|
||||||
|
|
@ -99,14 +98,7 @@ class _SideNavigationBarState extends ConsumerState<SideNavigationBar> {
|
||||||
onHover: (value) => startTimer(),
|
onHover: (value) => startTimer(),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
if (isDesktop && AdaptiveLayout.of(context).platform != TargetPlatform.macOS) ...{
|
SizedBox(height: padding.top),
|
||||||
const SizedBox(height: 4),
|
|
||||||
Text(
|
|
||||||
"Fladder",
|
|
||||||
style: Theme.of(context).textTheme.titleSmall,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
if (AdaptiveLayout.of(context).platform == TargetPlatform.macOS) SizedBox(height: padding.top),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
key: const Key('navigation_rail'),
|
key: const Key('navigation_rail'),
|
||||||
|
|
@ -114,9 +106,15 @@ class _SideNavigationBarState extends ConsumerState<SideNavigationBar> {
|
||||||
child: Column(
|
child: Column(
|
||||||
spacing: 2,
|
spacing: 2,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Padding(
|
||||||
alignment: largeBar && expandedSideBar ? Alignment.centerRight : Alignment.center,
|
padding: const EdgeInsets.symmetric(horizontal: 14),
|
||||||
child: Opacity(
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
if (expandedSideBar) ...[
|
||||||
|
Expanded(child: Text(context.localized.navigation)),
|
||||||
|
],
|
||||||
|
Opacity(
|
||||||
opacity: largeBar && expandedSideBar ? 0.65 : 1.0,
|
opacity: largeBar && expandedSideBar ? 0.65 : 1.0,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
onPressed: !largeBar
|
onPressed: !largeBar
|
||||||
|
|
@ -128,9 +126,13 @@ class _SideNavigationBarState extends ConsumerState<SideNavigationBar> {
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
largeBar && expandedSideBar ? IconsaxPlusLinear.sidebar_left : IconsaxPlusLinear.menu,
|
largeBar && expandedSideBar
|
||||||
|
? IconsaxPlusLinear.sidebar_left
|
||||||
|
: IconsaxPlusLinear.menu,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue