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

This plugin did not work on windows 11. #36

Open
liudonghua123 opened this issue Oct 17, 2021 · 4 comments
Open

This plugin did not work on windows 11. #36

liudonghua123 opened this issue Oct 17, 2021 · 4 comments

Comments

@liudonghua123
Copy link

liudonghua123 commented Oct 17, 2021

I tried to add some code like the following in my main.dart.

  if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
    var size = Size(config.windowWidth, config.windowHeight);
    // disable window resizing
    await DesktopWindow.setWindowSize(size);
    await DesktopWindow.setMinWindowSize(size);
    await DesktopWindow.setMaxWindowSize(size);
  }

However, I got no response on windows 11, I have tested it ok on windows 10. If I comment these pieces of code or change it to use window_size of github.com/google/flutter-desktop-embedding, it works too.

64eLIdthUo.mp4
@ghost
Copy link

ghost commented Oct 19, 2021

same issue, windows 10 can't use method to restrict window frame size

@marcosjav
Copy link

I had the same problem. I fixed it removing the "await" key

@denver-code
Copy link

I had the same problem. I fixed it removing the "await" key

Thanks man! it helped me too, but it's still strange

@AwsmAsim
Copy link

Did you call this method in the main() ?

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

4 participants