I am not able to change the default output screen in flutter to a certain specific resolution. I am also unable to remove the minimize and maximize buttons in the default app bar.
in the image the resolution size is different I want it to be changed to 500 x 500 for all the screen sizes such as 14inchs, 17 inches laptop. If I am setting 1500×1200 in a 14-inch lap it is increased in a 17-inch lap for the same resolution instead I want 900×700 to be fixed for different screen sizes – how can I attain that?
Or is there any way I can fetch the physical screen size and set the percentage to 80% or 60% of the output screen? For desktop applications in Windows, Linux, and macOS, not Android, or iOS!
Referred with https://github.com/polilluminato/simple-flutter-resizewindow where a button is being set and calling different resolutions such as desktop to a certain resolution 1440×900 and tab and mobile so on but I want the default app bar size to be changed so that I could not achieve also disabling the minimize and maximizing button of the default app bar.
I am unable to do all these is for the web application, not Android, or iOS, by window_manager I am able to achieve this but for different lap inches the resolution change how to fix this also want to remove the minimize and maximize button
await windowManager.setSize(Size(800, 600));
Or desktop_window
:
Size size = await DesktopWindow.getWindowSize();
DesktopWindow.setWindowSize(Size(800,600));
DesktopWindow.setFullScreen(true);
2
Answers
I was able to fix the above question i asked with the below code : my concern was it should reflect the same size on an 17inch lap and 14inch lap and it was fixed ..!!
doWhenWindowReady(() { WidgetsFlutterBinding.ensureInitialized() .renderView .automaticSystemUiAdjustment = false; final win = appWindow; const initialSize = Size(800, 600);
To get
Height
andWidth
of the Screen try :