Skip to content

Instantly share code, notes, and snippets.

@devomman
Last active November 16, 2023 12:51
Show Gist options
  • Save devomman/43dfe2bb438ebfddb5c58fb9dbf74dc1 to your computer and use it in GitHub Desktop.
Save devomman/43dfe2bb438ebfddb5c58fb9dbf74dc1 to your computer and use it in GitHub Desktop.
fvm command (Flutter Version Manager)

Requiremnets:

  1. chocolatey Install https://chocolatey.org/install (Windows) (Read CarefullY If Required)
  2. Brew Install https://brew.sh/ (MacOS) (Read CarefullY If Required)
  3. Powershell in Administration or Terminal User Open with Administration

ISSUE on WINDOWS User:

  1. For Flutter on Windows: "Unable to find git in your PATH" if terminal is not in admin mode Issue
  • any programme run as adminnistrator ex. Android Studio shortcut Run as Administrator

Command in Windows:

  1. Install fvm (Flutter Version Manager) choco install fvm and Accept All
  2. Check flutter Installed Currently fvm list
  3. Check flutter Realeased Versions fvm releases
  4. Install flutter Specific Version fvm install 3.0.0 or fvm install stable or fvm install dev
  5. Use flutter Globally fvm global 3.0.0 and copy the flutter path and pest it to enviorment PATH
  6. Now check with flutter doctor
  7. Use flutter LOCALLY fvm use 3.0.0 for Create Specific Version Project
  8. If Not Required Flutter fvm remove 3.0.0
  9. Android Studio Goto File > Setting > Languages & Frameworks > Flutter > Flutter SDK Path: C:\Users\devom\fvm\default
  10. Download and use globally easily and path to andorid studio for switiching to another version

Command in MacOS:

  1. Install fvm (Flutter Version Manager) brew tap leoafarias/fvm then brew install fvm and Accept All
  2. Check flutter Installed Currently fvm list
  3. Check flutter Realeased Versions fvm releases
  4. Install flutter Specific Version fvm install 3.0.0
  5. Use flutter Globally fvm global 3.0.0 and copy the flutter path and pest it to enviorment PATH
  6. open in terminla vim $HOME/.zshrc and press i to insert export PATH="/Users/devomman/fvm/default/bin:$PATH" then esc and write :wq! to save
  7. Now check with flutter doctor
  8. Use flutter LOCALLY fvm use 3.0.0 for Create Specific Version Project
  9. If Not Required Flutter fvm uninstall 3.0.0
  10. Android Studio Goto File > Setting > Languages & Frameworks > Flutter > Flutter SDK Path: /Users/devomman/fvm/default
  11. Download and use globally easily and path to andorid studio for switiching to another version

ISSUE on MAC User:

  • Issue: (x) zsh: command not found: .zshrc
  • Fix: (v) export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

Uninstall:

  • choco uninstall dart-sdk
  • choco uninstall fvm
  • If Exists MAC: /Users/devomman/fvm/ and WINDOWS: C:\Users\devom\fvm\ then Delete this folder
@kadadapp
Copy link

@devomman Thanks!

@devomman
Copy link
Author

@devomman Thanks!

Your are welcome !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment