Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Manage Workspace with multiple projects in VSCode #702

Open
MobiliteDev opened this issue Mar 26, 2024 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@MobiliteDev
Copy link

Is your feature request related to a problem? Please describe.
When you have 2 projects managed individually by FVM, with 2 Flutter SDK differents, the SDK is not detected properly.

Describe the solution you'd like
I would like to have a workspace with multiple projects (which have différents Flutter version), and be able to develop with the good SDK version configured for each project with FVM

@MobiliteDev MobiliteDev added the enhancement New feature or request label Mar 26, 2024
@leoafarias
Copy link
Owner

@MobiliteDev I believe this might be something with the Flutter VSCode extension. Not sure if it uses the settings.json for each project, which is pointing into the different versions.

@agonzalezpuerta
Copy link

agonzalezpuerta commented May 10, 2024

I've been facing this "issue" as well since I started using FVM and would be an nice feature to implement. As @leoafarias mentions, it is highly likely an issue with the Flutter VSCode extension.

I will give you guys an example of how the VSCode workspace is useful for Flutter development. My workspace is set up as follows:

  • App 1
  • App 2
  • Propietary Shared Flutter Package

In this way, I can develop simultaneously for both apps and the shared package while getting linting and error highlighting for the entire project.

The way I use FVM is:

  1. Install the Flutter SDK versions locally with FVM.
  2. Configure the VSCode extension to look for the downloaded SDKs by FVM. I.e., set up the "Flutter Sdk Paths" property of the VSCode extension with the paths downloaded in the previous step.
  3. The "Add Sdk To Terminal Path" is enabled in the VSCode extension so that local VSCode terminals can make use of the "flutter" command.
  4. Toggle between Flutter SDKs using the VSCode extension.

The main drawback here is that you need to remember which SDK your project is using which is not feasible if you develop lots of apps. Also, you need to remove the default path to Flutter from your PATH variable for Step 3 to work. This means that you won't be able to access the "flutter" command outside VSCode terminals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants