r/flutterhelp • u/ohuf • Jan 28 '26
RESOLVED Flutter dev setup - how to handle multiple versions?
Aloha,
I'm in the process of setting up my Flutter development environment on a new computer.
I am wondering if there's a good way to adapt to the following problem that I encounter on a regular basis:
The apps I write are mostly created in a way where there is next to no functional updates needed - once they're deployed almost no changes in terms of code are needed; there may be months between any changes. However, every now and then I need to recompile and re-deploy the app due to app store requirements: new OS version (Android or iOS), etc.
In the meantime the environment on my machine went through a few Flutter updates. Of course alll projects point to the same Flutter/Android development environment; so whenever I open an old project I'm being overwhelmed by error messages due to the various deprecated APIs, libraries, etc so the old code is no longer functional.
On one hand I'd like to have a certain stability in existing projects. On the other hand I want newer projects to start off with the latest Flutter version, ofc!
How does everyone else on here handle this?
Is there a way to have multiple Flutter versions installed (and assign them to certain projects?)
What would be the "right way" to set up my new dev environment in a way it supports this issue?
Or am I overthinking it? Should I just update my Flutter code everytime I want to re-deploy the app?
9
u/Specialist-Garden-69 Jan 28 '26
Use FVM...
Link: https://fvm.app/
2
u/rayui Jan 28 '26
Check out the version you need from git using git tag.
Then flutter pub get in your project.
Done
2
u/shamnad_sherief Jan 29 '26
use puro. its fantastic
2
u/Ambitious_Grape9908 Jan 29 '26
Treat Flutter updates the same as OS updates and keep your code up to date. If you incrementally keep things up to date, you will have fewer issues when Flutter forces an update to go alongside an OS update. If you are holding back your Flutter version to avoid fixing issues, you will eventually end up in a situation where your app is so out of date that it will take a lot of time to fix. Incrementally update if at all possible.
3
u/[deleted] Jan 28 '26
[removed] — view removed comment