How to check the flutter version of a project

Viewed 13823

I have just cloned a Flutter project that was made about 2 years ago. I want to check what version of flutter was used to create this project.
I want to migrate it to the latest version which is 2.2.

Thank you.

2 Answers
  • If the project has pubspec.lock file, then you can check the version of every package including flutter in it.
  • It's optional to mention flutter version in pubspec.yaml, so it might or might not be there.
  • If the project uses some version manage tool (like fvm), then it would be specified there ( a two year project might not have used it).

I don't think there is another way to check flutter version of a project. You might have to ask the project owner if none of the above solution works.

sdks:
  dart: ">=2.10.2 <2.11.0"
  flutter: ">=1.22.2 <2.0.0"

so if dart version is >=2.10.2 <2.11.0 u can use flutter >=1.22.2 <2.0.0

Related