How to restrict device width in flutter using screenutils?

41 Views Asked by At

Now issue i am facing is, i want to build the app for desktop aswell which has a wide screen. Screenutils is taking the width of whole device regardless the constraints of parent widget, is there a way to restrict the device width to mock a mobile device on desktop?

I am using a renowned package screenutil to use the functionality of responsiveness according to my designsize in figma, i am also utilizing the the .sp, .r, .h, .w features from this package. The design size i have mentioned with this package is for Mobile device

i am calculating the width by aspect ratio 9/16 (to show a mobile on center of the screen). This works fine for me, just the screenutils package takes the whole width of the device and there is no way to restrict the width, my responsiveness for the components that use 1.sw gets disturbed.

Can anyone help with this issue?

0

There are 0 best solutions below