How to use two version of flutter on same device for different projects? How to use two version of flutter on same device for different projects? flutter flutter

How to use two version of flutter on same device for different projects?


Flutter SDK can be specified per workspace if you use VSCode. You need to:

  1. Clone flutter repo to a new folder:
mkdir ~/flutter_devcd ~/flutter_devgit clone https://github.com/flutter/flutter.git .
  1. Create .vscode/settings.json with the following content:
{  "dart.flutterSdkPath": "/Users/youruser/flutter_dev"}
  1. Restart VSCode and you're good to go.

See more info in Dart Code - Quickly Switching Between SDK Versions


According to this issue on Flutter's repo iqbalmineraltown has the answer:

You might want to download multiple version as you need, because each Flutter SDK version is tightly coupled with specific Dart SDK.

You set the Flutter version for each project, and iqbalmineraltown highlights a way if you're using VS Code:

If you're using VSCode, you can download multiple version of flutter SDK into different path and quickly switch between them using Dart&Flutter Plugin You can set default SDK for each project by providing default SDK path for each workspace. So when you open a project, VSCode will use the version you specified for that project.


If you are using Android Studio, you can set difference version of Flutter for each project from menu File => Setting => Languages & Frameworks => Flutter:enter image description here

And to run the flutter/dart from the command line for multiple flutter version, you can follow this article https://medium.com/@sarbagyastha/using-two-or-more-different-versions-of-flutter-in-single-machine-484293c2a7ff