'Change the Flutter desktop app window size

I am trying to build a desktop app with flutter. I want to display the app window half the size of screen when login screen of the app is visible.

Is there a way to change the size of the App window programmatically? Actually I am new to dart and flutter Please help me, I can't find a way to do it.



Solution 1:[1]

you can use window_manager

await windowManager.setSize(Size(800, 600));

or desktop_window

 Size size = await DesktopWindow.getWindowSize();
 DesktopWindow.setWindowSize(Size(800,600));
 DesktopWindow.setFullScreen(true);

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1