1
votes

I've been searching for days

Is there a solution to have a flutter emulator that changes screen size just like resizing browser window to test the responsiveness of the ui design code using flutter, in vs code or intellijIDEA ?

I only found that possible using google chrome browser by running flutter_web project while changing the channel to flutter channel beta

And it requires as well after setting up the framework and after adjusting system environment variables that you will need to change all imported package:flutter/material.dart to flutter_web/material.dart and so you don't just copy the library files and folders and paste them there in the flutter_web new project

Which means you will have two separate projects and so the process of testing each responsive screen design in google chrome dynamically will be a very lengthy process to keep coping and pasting the code from that project to this project to test it on chrome browser.

There must be an emulator that just has the feature of dynamically change emulator screen size & rati,, any ideas ?

3

3 Answers

1
votes

You can use this package to test your app on different screen sizes https://pub.dev/packages/device_preview

1
votes

At the moment, you can run your app on Google Chrome. For that just select Chrome as your device to run the app.

Wait the page be loaded and then press F12 and click on "toggle device toolbar" (pointed by the red arrow on the image below), now you can use the page resize tool.

enter image description here

By far is the best way now.

Works very nice, try it.

0
votes

As far as I know there isn't!

But there is multiple websites which take an apk file and run it to a lot of different devices with different size and aspect ratios.

Or, you can use 3 to 4 different offline emulator devices and select their screen size so that covers big range of them. like 4inch, 5inch and 7inch phones and one tablet size.