-
Notifications
You must be signed in to change notification settings - Fork 109
Use VS code extension with FVM #272
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -231,6 +231,72 @@ To delete a Custom Action or Widget, delete the associated file. | |
### Adding New Dependencies | ||
You can add custom [pub.dev](https://pub.dev/) package dependencies with the `Dart: Add Dependency` command from the Visual Studio Code command palette. This will update the `pubspec.yaml` file. | ||
|
||
## Use with Flutter Version Management (FVM) | ||
If you want to manage Flutter versions with **Flutter Version Management (FVM)**, you need to install it and add it to your system’s PATH. Follow these steps to get started: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should point it to FVM homepage for more info. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup! added now. |
||
|
||
### Install FVM | ||
|
||
To install **FVM**, run the following command in your terminal. This installs FVM globally using Dart’s package manager. | ||
|
||
``` | ||
dart pub global activate fvm | ||
``` | ||
|
||
### Add FVM to Your System’s PATH | ||
|
||
After installation, you need to add the directory containing FVM’s executables to your **PATH variable** so that it can be accessed globally. | ||
|
||
#### For macOS & Linux | ||
|
||
1. Open the Terminal and run the following command. It adds the `~/.pub-cache/bin` directory to your system's `PATH` permanently by updating your `~/.zshrc` file. This ensures that the FVM installed in `~/.pub-cache/bin` is accessible from anywhere in the terminal. | ||
|
||
```bash | ||
echo 'export PATH="$PATH":"$HOME/.pub-cache/bin"' >> ~/.zshrc # For Zsh | ||
echo 'export PATH="$PATH":"$HOME/.pub-cache/bin"' >> ~/.bashrc # For Bash | ||
``` | ||
|
||
2. Restart your terminal or run `source ~/.zshrc` (or `source ~/.bashrc`) to apply the changes. | ||
|
||
#### For Windows | ||
|
||
1. Locate the **FVM executable path**, typically: | ||
|
||
``` | ||
C:\Users\YourUsername\AppData\Local\Pub\Cache\bin | ||
``` | ||
|
||
2. Add this path to your **System’s PATH variable**: | ||
1. Open **System Properties** → **Advanced system settings**. | ||
2. Click **Environment Variables**. | ||
3. Under **System variables**, select **Path** → **Edit**. | ||
4. Click **New** and add the above path. | ||
5. Click **OK** and restart your terminal. | ||
|
||
|
||
### Verify the Installation | ||
|
||
To check if FVM is correctly installed and accessible, run: | ||
|
||
```bash | ||
fvm --version | ||
``` | ||
|
||
If this command prints the installed version of FVM, it means FVM is successfully installed and added to PATH. | ||
|
||
|
||
### Configure FVM in Your Flutter Project | ||
|
||
Once FVM is installed, navigate to your Flutter project folder and set up FVM: | ||
|
||
```bash | ||
cd your-flutterflow-project | ||
fvm init | ||
fvm install <flutter_version> | ||
fvm use <flutter_version> | ||
``` | ||
|
||
*(Replace `<flutter_version>` with the required Flutter version.)* | ||
|
||
|
||
## FAQs | ||
<details> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!