Android Studio and Flutter - possible to have web enabled in one project but not in other?

132 views Asked by At

I'm writing an app for iOS and Android which has a companion web app. Rather than mess about with writing the web app separately in HTML and JS (which I have very little experience in), I figured I'd write it in Flutter too.

In order to do this, I have had to go onto a Flutter beta-branch. This fundamentally breaks my iOS/Android app, with dozens of errors which weren't there before (some really odd stuff too!) - so is there a way to turn off web support or force Android Studio to look at different branches of Flutter in order to protect against this so I can develop the apps side by side?

Thanks in advance for any help!

1

There are 1 answers

0
Owczar On BEST ANSWER

First option: manage flutter versions by hand

  1. Switch to the master branch on your current flutter version and clone beta branch to another directory.
  2. Add new path (flutterb for instance) and point it to the directory with flutter beta.
  3. In Android Studio go to File > Settings >Languages & Frameworks > Flutter and change the path to point to flutter beta. It changes that settings globally, so you need to change it each time unfortunately.

Second option: try Flutter Version Management - recommended one