Should I have separate .fvmrc files for all packages within the same project? #659
-
Before updating fvm while I was still using fvm_config.json, in my GIT workflows I could just do fvm install in the root folder and all the packages in the project would use the same flutter version. After updating fvm recently, doing fvm install in root folder installs the flutter using the version specified in .fvmrc file but once it changes directory to go to a different package within the same project I get "flutter not found". I can fix this by:
Should I be setting the global version or have separate .fvmrc files which means maintaining that version and synchronizing it with the version of .fvmrc in root folder? I only have this issue on GIT as locally I've flutter version added to path. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
@iamongit, you don't need to have a .fvmrc for each package. But you need to have a pubspec at the root of the directory that you want the .fvmrc in |
Beta Was this translation helpful? Give feedback.
-
Thanks, I am still a bit unclear on this. If I have a project containing e.g. 3 flutter packages each with their own pubspec file, earlier I only needed one fvm_config.json at the root folder which contained these3 package folders. Now do I need 3 separate .fvmrc files for the 3 packages?
What would be the optimal way of maintaining this instead of having 3 .fvmrc files and having to maintain the version in all 3 files? |
Beta Was this translation helpful? Give feedback.
You need to create a pubspec.yaml at the root, you can do something like
pubspec.yaml
and now you can have a .fvmrc on that directory