Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to set max/min size app in flutter desktop?

I am developing a Windows flutter application. By default, the user can make the app too small to overflow the text, or too large to disrupt the design of the app.

How can I solve this issue ?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Use bitsdojo_window Flutter package .

For set min/max size window try this

void main() {
  runApp(MyApp());

 //After runApp

  doWhenWindowReady(() {
    final initialSize = Size(800, 650);
    final minSize = Size(600, 450);
    final maxSize = Size(1200, 850);
    appWindow.maxSize = maxSize;
    appWindow.minSize = minSize;
    appWindow.size = initialSize; //default size
    appWindow.show();
  });
}

For more information checkout bitsdojo_window

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading