From 818b99487b96e77cde72e3fadd46dee0f64c373e Mon Sep 17 00:00:00 2001 From: Pinkesh Date: Mon, 3 Feb 2025 11:08:48 +0530 Subject: [PATCH 1/2] Use with FVM --- .../adding-customization/vscode-extension.md | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/docs/ff-concepts/adding-customization/vscode-extension.md b/docs/ff-concepts/adding-customization/vscode-extension.md index 014cc417..4f9bf0ff 100644 --- a/docs/ff-concepts/adding-customization/vscode-extension.md +++ b/docs/ff-concepts/adding-customization/vscode-extension.md @@ -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: + +### 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 +fvm use +``` + +*(Replace `` with the required Flutter version.)* + ## FAQs
From 3b2741c0180fd547bdc751c7e7557f6e2be24001 Mon Sep 17 00:00:00 2001 From: Pinkesh Date: Tue, 11 Feb 2025 11:11:34 +0530 Subject: [PATCH 2/2] Added link --- docs/ff-concepts/adding-customization/vscode-extension.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ff-concepts/adding-customization/vscode-extension.md b/docs/ff-concepts/adding-customization/vscode-extension.md index 4f9bf0ff..68f51f39 100644 --- a/docs/ff-concepts/adding-customization/vscode-extension.md +++ b/docs/ff-concepts/adding-customization/vscode-extension.md @@ -231,8 +231,8 @@ 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: +## Using Flutter Version Management (FVM) +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: ### Install FVM