Skip to content

Commit f205fc9

Browse files
authored
Merge pull request #272 from FlutterFlow/feature/fvm-vs-code
Use VS code extension with FVM
2 parents 1ac0836 + 1254658 commit f205fc9

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

docs/ff-concepts/adding-customization/vscode-extension.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,72 @@ To delete a Custom Action or Widget, delete the associated file.
231231
### Adding New Dependencies
232232
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.
233233

234+
## Using Flutter Version Management (FVM)
235+
If you want to manage Flutter versions with [**Flutter Version Management (FVM)**](https://fvm.app/), you need to install it and add it to your system’s PATH. Follow these steps to get started:
236+
237+
### Install FVM
238+
239+
To install **FVM**, run the following command in your terminal. This installs FVM globally using Dart’s package manager.
240+
241+
```
242+
dart pub global activate fvm
243+
```
244+
245+
### Add FVM to Your System’s PATH
246+
247+
After installation, you need to add the directory containing FVM’s executables to your **PATH variable** so that it can be accessed globally.
248+
249+
#### For macOS & Linux
250+
251+
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.
252+
253+
```bash
254+
echo 'export PATH="$PATH":"$HOME/.pub-cache/bin"' >> ~/.zshrc # For Zsh
255+
echo 'export PATH="$PATH":"$HOME/.pub-cache/bin"' >> ~/.bashrc # For Bash
256+
```
257+
258+
2. Restart your terminal or run `source ~/.zshrc` (or `source ~/.bashrc`) to apply the changes.
259+
260+
#### For Windows
261+
262+
1. Locate the **FVM executable path**, typically:
263+
264+
```
265+
C:\Users\YourUsername\AppData\Local\Pub\Cache\bin
266+
```
267+
268+
2. Add this path to your **System’s PATH variable**:
269+
1. Open **System Properties****Advanced system settings**.
270+
2. Click **Environment Variables**.
271+
3. Under **System variables**, select **Path****Edit**.
272+
4. Click **New** and add the above path.
273+
5. Click **OK** and restart your terminal.
274+
275+
276+
### Verify the Installation
277+
278+
To check if FVM is correctly installed and accessible, run:
279+
280+
```bash
281+
fvm --version
282+
```
283+
284+
If this command prints the installed version of FVM, it means FVM is successfully installed and added to PATH.
285+
286+
287+
### Configure FVM in Your Flutter Project
288+
289+
Once FVM is installed, navigate to your Flutter project folder and set up FVM:
290+
291+
```bash
292+
cd your-flutterflow-project
293+
fvm init
294+
fvm install <flutter_version>
295+
fvm use <flutter_version>
296+
```
297+
298+
*(Replace `<flutter_version>` with the required Flutter version.)*
299+
234300

235301
## FAQs
236302
<details>

0 commit comments

Comments
 (0)