How can one set the initial size of the Flutter desktop app to maximized in desktop platforms (Windows, macOS, Linux)?
I know there are window size plugins and we can set size manually, but is there any simple way, like for example Window.startupSize=WindowSize.Maximized
There are old issues in Flutter community (https://github.com/flutter/flutter/issues/39556) but I want to know what is latest update?
For future reference to anyone still facing this issue you can locate this code in the file:
windows/runner/win32_window.cpp
bool Win32Window::Show() {
return ShowWindow(window_handle_, SW_SHOWMAXIMIZED);
}
its in line 152 and you can replace SW_SHOWNORMAL with SW_SHOWMAXIMIZED
answered Jan 28 '26 11:01
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With