How to upgrade to Flutter 3.7?

99 Views Asked by At

I want to upgrade to Flutter 3.7 so I can start using Serverpod (which requires version 3.7). However when I perform flutter upgrade it says:

Flutter is already up to date on channel stable
Flutter 3.16.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 78666c8dc5 (2 weeks ago) • 2023-12-19 16:14:14 -0800
Engine • revision 3f3e560236
Tools • Dart 3.2.3 • DevTools 2.28.4

I ready that in order to upgrade to 3.7 you need to install Flutter Version Manager. So I did and this is the result:

dart pub global activate fvm
Package fvm is currently active at version 2.4.1.
The package fvm is already activated at newest available version.
To recompile executables, first run `dart pub global deactivate fvm`.
Installed executable fvm.
Warning: Pub installs executables into $HOME/.pub-cache/bin, which is not on your path.
You can fix that by adding this to your shell's config file (.bashrc, .bash_profile, etc.):

  export PATH="$PATH":"$HOME/.pub-cache/bin"

Activated fvm 2.4.1.

But then when I perform fvm install 3.7.16 it returns:

zsh: command not found: fvm

Why does it say command not found and how can I fix it?

1

There are 1 best solutions below

2
On

Why does it say command not found and how can I fix it?

Quoting the output you got after activating the fvm:

Pub installs executables into $HOME/.pub-cache/bin, which is not on your path.
You can fix that by adding this to your shell's config file (.bashrc, .bash_profile, etc.):

  export PATH="$PATH":"$HOME/.pub-cache/bin"