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.
I'm trying to add sidebar toggling from a
PlatformMenuItem
, nested in aPlatformMenuGroup
, nested in aPlatformMenuBar
which is achild
ofMacosWindow
.I get the following error:
It seems to MacosWindowScope is not present several widgets down the tree in the PlatformMenuItem.
I tried settings a
GlobalKey
for bothMacosWindow
, and theSidebar
widgets, but can't seem to access theisSidebarShown
property nor thetoggleSidebar()
method.I'm wondering how I can toggle the sidebar from a system menu provided by
PlatformMenu
.