Flutter version used in project

Viewed 1670

Where can I see the flutter version used in a flutter project? Is there a file inside the project directory where I can see it? I think it is not specified inside the pubscpec.yaml file

4 Answers

So far, I think the specific version can not be found but only what versions can be used in a project. It can be found at the bottom part of pubscpec.lock file

pubspec.lock screenshot

It will not show version project wise. It will overall flutter version that you have installed in your system. For that:

  1. Open your flutter project root directory in Command Prompt or Terminal type:
    flutter --version command.

  2. After typing the above command hit enter and You’ll see it will display us the currently installed flutter and Dart version in your computer and also tells us which version type we have installed like Stable or Beta.

Note: There is no such feature/command to check about which version of flutter you have used in Specific project.

Check this thread it will give you more idea: https://github.com/flutter/flutter/issues/14230

All projects you run will use the flutter sdk installed in your machine/computer from where you specified its location from. So if the version the project uses don't match with the version you've and they conflict, you will have errors and if there is a huge gap and breaking changes, you'll need to either upgrade or downgrade the sdk. But most of the time, things are deprecated before they just become breaking changes and so you shouldn't have big issues. So the best thing to do is usually to upgrade. First check your sdk version via flutter --version. If its outdated, use flutter upgrade to upgrade it.

You can either run flutter --version to check flutter version installed on your machine or check it in your pubspec.lock file for current flutter version in your project

sdks:
  dart: ">=2.10.0-110 <2.11.0"
  flutter: ">=1.16.0 <2.0.0"
Related