From 017b12ce5329d1debea2b7364d7c9b1fbb387acb Mon Sep 17 00:00:00 2001 From: GT610 Date: Mon, 11 May 2026 10:59:05 +0800 Subject: [PATCH 1/2] Add safearea for tablet sidebar --- lib/view/page/home.dart | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/view/page/home.dart b/lib/view/page/home.dart index 609314285..b120d655e 100644 --- a/lib/view/page/home.dart +++ b/lib/view/page/home.dart @@ -219,12 +219,14 @@ class _HomePageState extends ConsumerState bottom: 10, left: 0, right: 0, - child: IconButton( - icon: const Icon(Icons.settings), - tooltip: libL10n.setting, - onPressed: () { - SettingsPage.route.go(context); - }, + child: SafeArea( + child: IconButton( + icon: const Icon(Icons.settings), + tooltip: libL10n.setting, + onPressed: () { + SettingsPage.route.go(context); + }, + ), ), ); }, From baea31cd669171d5afa8204827963e40827c05c4 Mon Sep 17 00:00:00 2001 From: GT610 Date: Mon, 11 May 2026 11:04:52 +0800 Subject: [PATCH 2/2] SafeArea for afull NavigationRailBar --- lib/view/page/home.dart | 70 ++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/lib/view/page/home.dart b/lib/view/page/home.dart index b120d655e..9aeba13df 100644 --- a/lib/view/page/home.dart +++ b/lib/view/page/home.dart @@ -190,36 +190,36 @@ class _HomePageState extends ConsumerState } Widget _buildRailBar({bool extended = false}) { - return Stack( - children: [ - ListenableBuilder( - listenable: _selectIndex, - builder: (context, _) { - if (_isServerFullscreenMode) return UIs.placeholder; - return NavigationRail( - extended: extended, - minExtendedWidth: 150, - leading: extended ? const SizedBox(height: 20) : null, - trailing: extended ? const SizedBox(height: 20) : null, - labelType: extended - ? NavigationRailLabelType.none - : NavigationRailLabelType.all, - selectedIndex: _selectIndex.value, - destinations: _tabs.map((tab) => tab.navRailDestination).toList(), - onDestinationSelected: _onDestinationSelected, - ); - }, - ), - // Settings Btn - ListenableBuilder( - listenable: _selectIndex, - builder: (context, _) { - if (_isServerFullscreenMode) return UIs.placeholder; - return Positioned( - bottom: 10, - left: 0, - right: 0, - child: SafeArea( + return SafeArea( + child: Stack( + children: [ + ListenableBuilder( + listenable: _selectIndex, + builder: (context, _) { + if (_isServerFullscreenMode) return UIs.placeholder; + return NavigationRail( + extended: extended, + minExtendedWidth: 150, + leading: extended ? const SizedBox(height: 20) : null, + trailing: extended ? const SizedBox(height: 20) : null, + labelType: extended + ? NavigationRailLabelType.none + : NavigationRailLabelType.all, + selectedIndex: _selectIndex.value, + destinations: _tabs.map((tab) => tab.navRailDestination).toList(), + onDestinationSelected: _onDestinationSelected, + ); + }, + ), + // Settings Btn + ListenableBuilder( + listenable: _selectIndex, + builder: (context, _) { + if (_isServerFullscreenMode) return UIs.placeholder; + return Positioned( + bottom: 10, + left: 0, + right: 0, child: IconButton( icon: const Icon(Icons.settings), tooltip: libL10n.setting, @@ -227,11 +227,11 @@ class _HomePageState extends ConsumerState SettingsPage.route.go(context); }, ), - ), - ); - }, - ), - ], + ); + }, + ), + ], + ), ); }