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

Consider moving away from static methods #28

Open
matthew-carroll opened this issue Jun 26, 2023 · 2 comments
Open

Consider moving away from static methods #28

matthew-carroll opened this issue Jun 26, 2023 · 2 comments

Comments

@matthew-carroll
Copy link

WindowManipulator is completely based on static methods. This seems to create at least three limitations:

Developers can't use Dart's built-in builder syntax:

WindowManipulator
  ..makeTitlebarTransparent()
  ..enableFullSizeContentView()
  ..etc

It seems unlikely that this API will work in a world with multiple windows.

The implementation can't be replaced with a fake version for tests.

All of these issues could be alleviated by using a typical singleton implementation: WindowManipulator.instance or WindowManipulator.primary, etc.

@Adrian-Samoticha
Copy link
Member

I am currently waiting for Flutter’s multi-window support to drop before implementing this. This way I will know what the Swift side is going to look like while designing the API. Plus, I would like to avoid breaking changes until then.

@Adrian-Samoticha
Copy link
Member

Apparently, Flutter’s development on the desktop side is currently on hold, which makes it unlikely that multi-window support will drop any time soon. We are currently discussing supporting multiple windows through window_manager_plus internally, however haven’t really settled on anything, yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants