macos_ui
macos_ui copied to clipboard
MacosWindowScope not available further down tree
I'm trying to add sidebar toggling from a PlatformMenuItem, nested in a PlatformMenuGroup, nested in a PlatformMenuBar which is a child of MacosWindow.
I get the following error:
No MacosWindowScope found in context 'package:macos_ui/src/layout/window.dart'
It seems to MacosWindowScope is not present several widgets down the tree in the PlatformMenuItem.
I tried settings a GlobalKey for both MacosWindow, and the Sidebar widgets, but can't seem to access the isSidebarShown property nor the toggleSidebar() method.
I'm wondering how I can toggle the sidebar from a system menu provided by PlatformMenu.
Closed this by accident, it's still an issue for me.