From 8918bdc93e52e3b8788fb779d909ece3ba9ec6cc Mon Sep 17 00:00:00 2001 From: edde746 <86283021+edde746@users.noreply.github.com> Date: Mon, 23 Feb 2026 13:11:11 +0100 Subject: [PATCH] fix: add OverlaySheetHost to desktop/TV navigation path --- lib/screens/main_screen.dart | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/screens/main_screen.dart b/lib/screens/main_screen.dart index 5af6a635..0b0afc6e 100644 --- a/lib/screens/main_screen.dart +++ b/lib/screens/main_screen.dart @@ -990,13 +990,14 @@ class _MainScreenState extends State with RouteAware, WindowListener ? SideNavigationRailState.expandedWidth : SideNavigationRailState.collapsedWidth; - return PopScope( - canPop: false, // Prevent system back from popping on Android TV - // ignore: no-empty-block - required callback, back navigation handled by _handleBackKey - onPopInvokedWithResult: (didPop, result) {}, - child: Focus( - onKeyEvent: (node, event) => _handleBackKey(event), - child: MainScreenFocusScope( + return OverlaySheetHost( + child: PopScope( + canPop: false, // Prevent system back from popping on Android TV + // ignore: no-empty-block - required callback, back navigation handled by _handleBackKey + onPopInvokedWithResult: (didPop, result) {}, + child: Focus( + onKeyEvent: (node, event) => _handleBackKey(event), + child: MainScreenFocusScope( focusSidebar: _focusSidebar, focusContent: _focusContent, isSidebarFocused: _isSidebarFocused, @@ -1050,6 +1051,7 @@ class _MainScreenState extends State with RouteAware, WindowListener ), ), ), + ), ); }, );