skip to Main Content

I am trying to set my flutter version to 3.10.2. I tried using fvm use 3.10.2.

When I run fvm list, I get:

Cache Directory:  /home/me/fvm/versions

3.19.3
3.10.2 (active)
3.3.1

But when running fvm flutter --version, i get:

Flutter 3.19.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 300451adae (vor 7 Tagen) • 2024-03-27 21:54:07 -0500
Engine • revision e76c956498
Tools • Dart 3.3.3 • DevTools 2.31.1

I run both commands in the same directory. This is a problem, because the fvm flutter pub run build_runner build command fails, due to the wrong version being used. Error I get is:

The current Dart SDK version is 3.3.3.

Because my-project requires SDK version 3.0.2, version solving failed.

How can I set my flutter version to 3.10.2.

2

Answers


  1. I don’t use fvm myself so I’m not sure why that is not working for you, but alternatively you can navigate to the directory where your flutter sdk is installed and do a

    git checkout 3.10.2
    

    for selecting the flutter version.

    Login or Signup to reply.
  2. If you are using window check your environment variable there you might have defined a static path to the flutter sdk which will be used when you run

    flutter --version
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search