desktop_window
desktop_window copied to clipboard
This plugin did not work on windows 11.
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.
https://user-images.githubusercontent.com/2276718/137615433-75a18ab6-92df-44f8-a3f1-a6a20afbb511.mp4
same issue, windows 10 can't use method to restrict window frame size
I had the same problem. I fixed it removing the "await" key
I had the same problem. I fixed it removing the "await" key
Thanks man! it helped me too, but it's still strange
Did you call this method in the main() ?