Running Flutter Desktop on Stable channel
TL;DR: Follow those steps if you want to run Flutter as a desktop application on beta
or stable
channels (and not only on master
or dev
).
At the time of writing this post, Flutter Desktop is still in Alpha and you are only allowed to enable it on master
or dev
channel.
In case you are using beta
or stable
channel, you are out of luck if you want to run your app as a MacOs/Windows/Linux app without the need of switching to more unstable channels. Or are you?
Running Flutter Desktop on any channel
- Make sure your app compiles for Flutter desktop on master or dev channel — guide how to do it
- Run
flutter doctor
while you arebeta
orstable
channel
- Go to Flutter’s main folder and
git checkout
the version that you want:
git checkout 1.22.2
- Run
flutter doctor
to download the needed dependencies and make sure chat channel isunknown
- Enable desktop configuration
flutter config --enable-linux-desktop --enable-macos-desktop --enable-windows-desktop
- Run
flutter devices
to check if you can now see desktop enabled
- Done!
Why not by default on beta and stable?
Flutter desktop is still under development and Flutter devs do not want everybody to start publishing production apps — more users ->more bugs ->more pressure.
However, if you need a desktop to check your app on different screen dimensions or run UI tests on docker containers, Flutter Desktop is pretty stable —we have been using it for 1.5 years.