Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacosWindowScope not available further down tree #498

Open
jocubeit opened this issue Nov 30, 2023 · 1 comment
Open

MacosWindowScope not available further down tree #498

jocubeit opened this issue Nov 30, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jocubeit
Copy link

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.

@jocubeit jocubeit added the bug Something isn't working label Nov 30, 2023
@jocubeit
Copy link
Author

Closed this by accident, it's still an issue for me.

@jocubeit jocubeit reopened this Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant