At March 4 2021, Flutter 2.0 is release as stable version. But if you have still have old projects that haven’t support yet for Flutter SDK v2.0+ and you also have some project that you want to try with Fluter SDK 2.0+. You may need to switch between Flutter SDK v1.+ and v2.0+. There will be multiple ways to handle on this SDK switch. But this article is for our customers who having issue on switching SDK. I hope this tutorial will help you switch easily to v1+ or v2+.

Before You Start

Before you start, you may need to install standard Flutter SDK first.
https://flutter.dev/docs/get-started/install

Checking Flutter Version

You can easily check your flutter version with the following command. After you know your current version, you can download the next version that you need to switch.

Copy to Clipboard

Download Flutter SDK

After that you can download at the following link for Flutter SDK.
Window => https://flutter.dev/docs/development/tools/sdk/releases?tab=windows
Mac => https://flutter.dev/docs/development/tools/sdk/releases?tab=macos
Linux => https://flutter.dev/docs/development/tools/sdk/releases?tab=linux

Finding Flutter SDK Path at your PC

Android Studio

Open Preferences -> Languages & Frameworks -> Flutter.
There you will find Flutter SDK Path.

VS Code

Code -> Preferences -> Setting, type “flutter sdk” and Click “settings.json”
There you will find Flutter SDK Path.

Changing Flutter SDK Folders

Now you already know your Flutter SDK path. So, open that folder. In my PC SDK folder name is called “01 Flutter

Current my flutter SDK version is 2.0, so, i backup that folder as “01 Flutter 2.0

After that i need to unzip downloaded flutter sdk at “Download Flutter SDKs” Sections. And i change the name to “01 Flutter“. In this case i have 2 SDK Folders.
1. 01 Flutter << That is flutter version 1.22.6 (( Active SDK ))
2. 01 Flutter 2.0 << That is flutter version 2.0

After that you need to run the following command at terminal (or) CMD. If your changing folder first time, it will download some libs. So, you may need to wait. But for the next time, you may not need to wait.

Copy to Clipboard

Now your SDK is changed back to flutter 1.22.6. And if you want to change back to Flutter 2.0
1. Just Rename 01 Flutter to 01 Flutter 1.22.6
2. Rename 01 Flutter 2.0 to 01 Flutter (( It will become Active SDK )
Then your Flutter SDK is switch to Flutter 2.0

If you like to know more about our products please check our portfolio (or) please send email to teamps.is.cool@gmail.com

Subscribe to our free newsletter