72

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

122

You can write

flutter upgrade 

command in terminal to update flutter sdk

8
  • 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. Sep 2, 2018 at 9:00
  • 1
    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. Sep 2, 2018 at 11:04
  • Will this upgrade to the stable version or the dev version by default?
    – Najeeb
    Nov 21, 2019 at 6:12
  • No, it will only update to the latest version of whatever channel you are using. Nov 21, 2019 at 6:23
  • 'flutter' is not recognized as an internal or external command, operable program or batch file.
    – Taba
    May 9, 2020 at 3:52
39

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
15

Open your terminal and type

flutter upgrade --force
2
  • 1
    This worked for me when "flutter upgrade" didn't. What does --force do? May 25, 2020 at 19:19
  • --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."
    – Elad Nava
    Sep 14, 2022 at 22:30
12

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
9

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
7

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.

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

1

Just run the flutter upgrade in terminal.

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

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.