Bilal Sloni
Bilal Sloni

Reputation: 47

How to use a different flutter version on a specific project

I have some of my flutter project that depends on flutter 2.10 and I have some that depends on flutter > 3.0. So if I want to work on any of my project depending on flutter > 3.0, I have to run flutter upgrade, vice versa for running project depending on flutter 2.10, I have to run flutter downgrade.

Is there a better way for me to use different version for a specific project?

Upvotes: 3

Views: 4713

Answers (2)

kinjal dhamat
kinjal dhamat

Reputation: 538

First the download the required flutter SDK.

If you are using Android Studio, you can change the Flutter version by navigating to Android Studio -> Settings -> Languages and Frameworks -> Flutter. After changing the version, apply the settings and check the bottom section to confirm the current version.

For double confirmation, you can also go to Tools -> Flutter -> Flutter Doctor, where you can see the Flutter version used by the project. enter image description here

Upvotes: 1

Randal Schwartz
Randal Schwartz

Reputation: 44091

You'll want the "flutter version management" for this: https://fvm.app. That'll let you download nearly any previous and current flutter release, and associate them on a project-by-project basis. It's quite robust and production-worthy.

Upvotes: 3

Related Questions