How i solve issues with 3.27 updates in my project?

Hey Flutter devs! :wave:

I wanted to open up a discussion about managing Flutter versions efficiently, especially when working across multiple projects. Have you guys tried FVM (Flutter Version Manager) before?

Let me share my recent experience:

I decided to update Flutter to the latest version to explore new updates, but that’s when the chaos started. :sweat:

  1. First, I faced compatibility issues with Gradle and Android tools.
  2. After fixing Gradle, another issue showed up with Agora SDK, and at that point, it felt like I was starring in an action movie fighting bugs left and right! :clapper::boom:

It got me thinking, ā€œThere has to be a better way to manage Flutter versions!ā€ That’s when I revisited FVM, and honestly, it was a game-changer.

What is FVM?

FVM (Flutter Version Manager) lets you:

  • Manage multiple Flutter versions easily.
  • Assign a specific Flutter version to each project.
  • Seamlessly switch between versions with a single command.

Why I Recommend FVM

  1. Saves Time: No more installing/uninstalling Flutter versions. Each project runs on its defined version without conflicts.
  2. Flexibility: Need Flutter 2 for one project and Flutter 3 for another? FVM handles it effortlessly. :sparkles:
  3. Easy Switching: Switching versions is as simple as running a single command.

Getting Started with FVM (Quick Steps):

  1. Install FVM:
dart pub global activate fvm  
  1. Install the desired version:
fvm install VERSION  
  1. Set the version for your project:
fvm use VERSION  
  1. Replace your flutter run command with:
fvm flutter run  

5.Tip for VSCode users*: Just restart the terminal, and flutter run will use the correct version automatically.

What about you guys?

  • How do you manage different Flutter versions across projects?
  • Have you faced similar issues when updating Flutter or handling SDK conflicts?
  • Any tips or tricks you’ve discovered while using FVM?

Let’s share experiences, best practices, and help each other! :rocket:
For those curious, here’s the official FVM documentation: https://fvm.app/.

Looking forward to hearing your thoughts and experiences! :bird::sparkles:

6 Likes

You could also consider https://puro.dev/ for that.

Edit: @RandalSchwartz made a video about this: https://youtu.be/olqmK-opexA

5 Likes

As I said in the video, FVM was great, until it was completely dwarfed by Puro for me.

2 Likes

So puro doesn’t requiere you to prepend Flutter with something like "puro Flutter runr?

If you do it within a supported IDE (VSCode and Jetbrains, at least), the default flutter and dart commands are the per-project setting, yes. If you do it outside an IDE, it uses whatever you’ve set as the ā€œglobal defaultā€. So, I rarely type ā€œpuro flutterā€¦ā€ unless I’m actually doing something like ā€œpuro -e legacy flutter ā€¦ā€ to get a different release.

2 Likes

Awesome that alone would be a reason for me
@eseidel does the Shorebird team plan to support Puro too?

I’m not sure what ā€œsupport puroā€ would mean, but certainly happy to consider such. Issues Ā· shorebirdtech/shorebird Ā· GitHub is the best way to make sure we don’t forget.

2 Likes

I can confirm shorebird is working without problems in an environment with puro :partying_face:, so you can sit back and relax (at least regarding this). Thank you for this amazing tool!

1 Like

Does it automatically pick up the correct Flutter version?

As I understand it, it does not. By default shorebird release uses the last stable version, if you want to use another flutter version you need to specify it.

That was whabmy original comment was aiming for. For code magic I added a script that extracts the Flutter version from the fvm.rc file.
Do something similar would need to be added for puro

1 Like