Flutter Community
Published in

Flutter Community

Flutter: Switch between channels without downloading the whole SDK every time

Flutter Logo

Flutter mobile uses the stable channel for building the app. But if you have to compile the code you built for web you need to switch the channel to master. If you are developing two projects, one for mobile and the other for web, you may easily get frustrated each time you switch the channel.

Switching between the channels cost a lot of time of development if the developer have to do it frequently. Even though the solution proposed here is not that professional but it does the job.

  1. All you have to do is to create a copy of the flutter SDK zip file and extract it into two different folders say C:\src\stable\flutter and C\src\master\flutter.
  2. Also download and extract the dart SDK to C:\src\stable\dart and C:\src\master\dart respectively
  3. Add C:\src\stable\flutter\bin;C:\src\stable\dart\dart-sdk\bin to the environment variable: PATH.
  4. Open a new command prompt window and run flutter channel stable
  5. Then run flutter doctor
  6. This will download the necessary components for flutter stable.
  7. Copy C:\src\stable\flutter\bin;C:\src\stable\dart\dart-sdk\bin; C:\src\stable\flutter\.pub-cache\bin to a notepad file.
  8. Delete the above paths from the Path environment variables
  9. Add C:\src\master\flutter\bin;C:\src\master\dart\dart-sdk\bin to the environment variable: PATH.
  10. Open a new command prompt window and run flutter channel master.
  11. Run flutter doctor
  12. This will download the necessary components for flutter master.
  13. Copy C:\src\master\flutter\bin;C:\src\master\dart\dart-sdk\bin; C:\src\master\flutter\.pub-cache\bin to a notepad file.

If you need to work with the channel stable (for mobile development), use the paths in step 7 with path environment variables and Path in Step 13 if you want to develop in the channel master (for web, desktop, etc.)

Warning: Do not have both of them in Path environment variables at the same time.

Hope you enjoy the article.




Articles and Stories from the Flutter Community

Recommended from Medium

Configure Webserver on a docker container using Ansible

Use Minikube instead of Docker Desktop fo

A Technical Leader’s Awakening — Part 2 : The Newbie’s bad habits.

Claris’ Product Vision | Codence | DevCon Orlando 2019

Access your Raspberry PI camera feed remotely from anywhere

Forecasting Volatility with GARCH Model-Volatility Analysis in Python

Create an AI with Finite State Machines! (Unity/C#)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Flutter enthusiast | Dart | Android app Developer | Web | Firebase | Node

More from Medium

How do we test Flutter applications? — Unit Test

Flutter Blocs: A Simple Introduction

Flutter, can it really be this easy

A Minimalist Guide to Isar