1

Flutter 3.0 is amazing !!
I can make a web app, android & iOS mobile app, and a native Mac app (and more) all from the one code base.

But now my problem is : How do I specify which OS to build-for and run-on ?

When I do flutter run or debug>run in VSCode it will build-for, and run-on, my Android device first if it plugged in, or else as a Mac app. I want to run it as Web. More generally, I want to specify which OS I want to build and run for.

Both the flutter run command line option, and the VSCode setting (preferably without messing about with launch.json, or else making that seem easy).

Ken White
  • 123,280
  • 14
  • 225
  • 444
kris
  • 11,868
  • 9
  • 88
  • 110

2 Answers2

0

You can use

flutter run -d chrome

For running it on chrome

flutter run -d your_device

For mobile device

Kaushik Chandru
  • 15,510
  • 2
  • 12
  • 30
0

It depends on the selected device. If you select an Android Device, it will build for Android OS. If you select a browser then it will run the build on your Default Browser and the same goes for other scenarios.