google / flutter-desktop-embedding

Experimental plugins for Flutter for Desktop
Apache License 2.0
7.1k stars 604 forks source link

setWindowMinSize and setWindowMaxSize not working in Flutter 2.8.0 on Windows 11 #892

Closed PeterNjeim closed 2 years ago

PeterNjeim commented 2 years ago

Is this a bug in one of the plugins in this project?

Which plugin is this bug report about?

window_size

Describe the bug

In Flutter 2.5.3, setWindowMinSize worked properly. In Flutter 2.8.0, setWindowMinSize now has no effect, and when testing setWindowMaxSize, it also has no effect. Tested on Windows 11 with a modified flutter tool to allow for the use of Visual Studio 2022.

Note that the modifications are extremely minor and only change the version number, and should have no effect on this bug. In Flutter 2.5.3, testing was also done on Visual Studio 2022.

Flutter doctor

[√] Flutter (Channel stable, 2.8.0, on Microsoft Windows [Version 10.0.22000.348], locale en-CA)
    • Flutter version 2.8.0 at C:\Users\<user>\Documents\source\repos\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision cf44000065 (4 days ago), 2021-12-08 14:06:50 -0800
    • Engine revision 40a99c5951
    • Dart version 2.15.0

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.0.1)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.0.31912.275
    • Windows 10 SDK version 10.0.22000.0

[√] VS Code (version 1.63.0)
    • VS Code at C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.29.0

[√] Connected device (1 available)
    • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.348]

• No issues found!
stuartmorgan commented 2 years ago

In Flutter 2.5.3, setWindowMinSize worked properly. In Flutter 2.8.0, setWindowMinSize now has no effect

Can you elaborate on what specifically you tested? E.g., is this building the exact same project with 2.8 vs 2.5, or is it flutter create on 2.5 vs flutter create on 2.8, followed by adding the plugin?

PeterNjeim commented 2 years ago

My issue was from building the exact same project with 2.8.0 vs. 2.5.3. However, I've since tested with a brand new flutter create project to see if the issue was present there as well, and it isn't. I've also since fixed the issue in my own project, but I can't tell for sure what exactly fixed it, nor do I care enough to recreate the situation I had earlier, so I'll close this.