89

I'm new in Flutter. 2 months ago I have installed flutter SDK in windows. Now I have seen a lot of updates available.

I want to update "Flutter SDK".

How to update Flutter SDK to the latest version?

9 Answers 9

143

You can write

flutter upgrade 

command in terminal to update flutter sdk

Sign up to request clarification or add additional context in comments.

8 Comments

Thanks for your answer. flutter upgrade update but not latest version. Latest version is 0.7.5 (github.com/flutter/flutter/releases) but after flutter upgrade, it update to 0.6.0 not 0.7.5.
May be you are in beta channel. You can check using flutter channel command. If you want to change channel the use flutter channel dev after that use flutter upgrade command to upgrade to latest version.
Will this upgrade to the stable version or the dev version by default?
No, it will only update to the latest version of whatever channel you are using.
'flutter' is not recognized as an internal or external command, operable program or batch file.
|
44

I want to upgrade most latest version. So I used below commands:

flutter channel dev

Flutter has 4 project branches / channels ie stable, master, dev, beta. First when we install it. flutter install stable channel.

If you want to switch :

flutter channel chanel_name

Then update that :

flutter upgrade

6 Comments

'flutter' is not recognized as an internal or external command, operable program or batch file.
you didn't installed flutter. this answer is for update flutter not new installation.
Dude if I didn't install it so what did I wanted to upgrade? :D It is installed and I'm coding on it.
check variable path.
|
22

Using Tool Menu:

You can update in android studio using Tools so follow these steps Android Studio -> Tools -> Flutter -> Flutter Upgrade.

enter image description here

Using Command:

You can write a command in the terminal to update flutter SDK

flutter upgrade 

Or if you have to upgrade it any way you can use

flutter upgrade --force

Comments

16

Open your terminal and type

flutter upgrade --force

2 Comments

This worked for me when "flutter upgrade" didn't. What does --force do?
--force overwrites local changes to your Flutter installation. As per the CLI: "Your flutter checkout has local changes that would be erased by upgrading. If you want to keep these changes, it is recommended that you stash them via "git stash" or else commit the changes to a local branch. If it is okay to remove local changes, then re-run this command with --force."
10

Sometime flutter upgrade seems not responsive but actually it's doing something. Just add the -v or --verbose option to see what actually happening.

flutter upgrade --verbose

Comments

8

We can upgrade the flutter by simply using Flutter command forcefully.

Like this one :

flutter upgrade --force

But before that we will have to make sure & take a note of few things otherwise it can be risky & we might loss some of our work as well.

Important Note :

  • While upgrading the flutter make sure all of your local work is already pushed to the server & you do have a proper back up of all of your code
  • Make sure you do have a back of all live changes you did & with working condition

Hopefully this will help out everyone.

Comments

3

A very much simple way is to go and download the new SDK and extract the the folder. Then replace the old sdk folder with the new one

Comments

2

Just run the flutter upgrade in terminal.

Or if you have to upgrade it any way you can use flutter upgrade --force

Comments

1

In Android Studio , in toolbar at top of the screen go to Android Studio -> Tools -> Flutter -> Flutter Upgrade.[Tools -> Flutter -> Flutter Upgrade.

Or open terminal and type command: flutter upgrade and hit Enter.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.