2

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.

asked Apr 4, 2024 at 6:54
1
  • from the root directory of your flutter project, run fvm use 3.10.2 Commented Apr 4, 2024 at 7:29

2 Answers 2

0

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
answered Apr 4, 2024 at 7:06
Sign up to request clarification or add additional context in comments.

Comments

-2

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.

answered Apr 4, 2024 at 7:05

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.