Which channel do I use in Flutter SDK?
From the Flutter wiki:
Flutter has the following channels, in increasing order of stability:
master
The current tip-of-tree, absolute latest cutting edge build. Usually functional, though sometimes we accidentally break things.
dev
The latest fully-tested build. Usually functional, but see Bad Builds for a list of known "bad" dev builds. We continually try to roll master to dev. Doing so involves running many more tests than those that we run during master development, which is why this is not actually the same to master.
beta
Every month, we pick the "best" dev build of the previous month or so, and promote it to beta. These builds have been tested with our codelabs.
stable
When we believe we have a particularly good build, we promote it to the stable channel. We intend to do this more or less every quarter, but this may vary. We recommend that you use this channel for all production app releases. We may ship hotfixes to the stable channel for high-priority bugs, although our intent is to do this rarely.
So, use whichever channel you feel comfortable with, meets your needs and/or has whichever fixes in it you need. Start with stable and go from there.
if you want to use flutter for production app then many developer and even google recommend to use stable . if you are using new feature and all feature that flutter provide that I would recommend master but not for production only for hobby project and improving your flutter skill and testing new thing that flutter provide. and not available in flutter stable.
now to know which branch you are currently using. open terminal and type the following command.
flutter channel
It will show branch with start in front of it. that is you current branch to change the branch you can simply use this command.
flutter channel ChannelName
use respectively channel name and hit enter and then run the below command
flutter upgrade
it will download all the require file from flutter GitHub and you will be ready to go.
all possible flutter channel are below.
master
The current tip-of-tree, absolute latest cutting edge build. Usually functional, though sometimes we accidentally break things.
dev
The latest fully-tested build. Usually functional, but see Bad Builds for a list of known "bad" dev builds. We continually try to roll master to dev. Doing so involves running many more tests than those that we run during master development, which is why this is not actually the same to master.
beta
Every month, we pick the "best" dev build of the previous month or so, and promote it to beta. These builds have been tested with our codelabs.
stable
When we believe we have a particularly good build, we promote it to the stable channel. We intend to do this more or less every quarter, but this may vary. We recommend that you use this channel for all production app releases. We may ship hotfixes to the stable channel for high-priority bugs, although our intent is to do this rarely.
Whenever you faced a strange behavior from the widgets and app like render glitch or getting white background you must change your channel to another channel and rebuild the app with that channel. With type this commands in terminal:
1- Current channel:
flutter channel
2- change the channel:
flutter channel CHANNEL_NAME
for example change the channel to master:
flutter channel master