How to install Flutter on Linux
Google and Canonical have joined forces to make Flutter available for the Linux desktop. Jack Wallen explains why this is important and how to install the SDK.
Recently, Canonical and Google made an announcement that could be a serious game-changer for the Linux landscape: The availability of alpha release of Flutter for the Linux operating system.
Of course, that announcement will have the standard squadron of naysayers pointing out that Canonical has tied Flutter to snap, which is akin to systemd–aka, the popular thing to rail against.
But the Linux community has always found something to hate.
There’s never a dearth of objections.
SEE: Implementing DevOps: A guide for IT pros (free PDF) (TechRepublic)
But, what Flutter could offer is a native desktop experience for apps that might otherwise never see the light of day on the Linux platform. Any app designed with Flutter could run on any platform. The big one–Google Assistant. Imagine gaining a full-fledged digital assistant on Linux. And yes, I know about Mycroft. I’ve recently installed and used Mycroft and found it to be nowhere near ready for prime time, especially for the average user.
Another outstanding example of a Flutter app is Flokk Contacts (Figure A–installed via snap on Linux). Flokk is one of the best designed contact apps I’ve seen in some time.
Flutter could open an entire world up for the Linux desktop–a world it desperately needs. It could bring games and a host of other types of applications to the open source desktop.
What is there to hate about that?
Is it about purity? Is it about favoritism? Is this an extension of the age-old distribution battle, where someone would rather see Distro X fade into memory, simply because it wasn’t Distro Y?
We knew this was coming
The writing has been on the wall for some time. As Linux continued to gain corporate popularity, it was clear the open source platform wouldn’t remain the darling underdog it had been for so many years.
In 1999, I attended my first Linux convention and saw nothing but hackers, small startups, and fans roaming the halls. The closest thing to a corporation was Red Hat, and that was before RHEL was ever a consideration. Even then, you knew something was going to blossom, some large company was going to catch wind of this powerful platform and strip away the charm, in favor of a more corporate sheen.
With every step Linux has taken toward that brilliant, high-gloss glow, it has gained something new to make it better, more marketable.
Flutter could be that next step. With companies like Google, Capital One, Square, eBay, BMW, and SONOS already working with Flutter, the sky’s the limit to what it can do for Linux.
Of course, Canonical is also investing in Flutter, by adding their own developers into the mix. The Canonical devs will work alongside Google. Ken VanDine, Canonical engineering manager, said this:
Canonical is making a significant investment in Flutter by dedicating a team of developers to work alongside Google’s developers to bring the best Flutter experience to the majority of Linux distributions. Canonical will continue to collaborate with Google to further improve Linux support and maintain feature parity with the other supported platforms.
The big appeal
For many, the big appeal of Flutter is similar to the appeal of Xamarin, where you could build an application using C# and that app would run on Android, iOS, macOS, or Windows as though native.
With Flutter, you could build a single app that would run on any application that supported the framework. So, that app you developed for Android would run on the Linux desktop as well. But, Flutter apps aren’t limited to the desktop. In 2018, Google launched a web runtime (codename “Hummingbird”) which was a new project focused on bringing Flutter apps to the web using the same code. Not much has been said of Flutter’s Web runtime over the past year, but it points to the seemingly limitless possibilities for the platform.
From my perspective, Flutter opens up a world of possibilities for Linux. The combination of a native package manager (such as apt), a universal package manager (such as snap), and Flutter could cause a massive boost to the amount of apps available for Linux.
How is that not a good thing?
How to install the Flutter SDK on Linux
Now that you have my take on Flutter, let’s get it installed, so you can start building your first app. Flutter is only available for installation via the snap store. To install, open a terminal window on your snap-supporting Linux desktop and issue the command:
sudo snap install flutter --classic
Along with the Flutter snap, install the flutter-gallery package, which highlights a number of build components available to use for building desktop apps. To install the flutter-gallery package, issue the command:
sudo snap install flutter-gallery
Next, initialize Flutter with the command:
flutter channel dev
Upgrade Flutter with the command:
Finally, so that you can build Linux desktop apps, enable the functionality with the command:
flutter config --enable-linux-desktop
And that’s all there is to it–why I believe Flutter is yet another positive step forward for the Linux platform and how you can install the SDK, so you can start building your first Flutter app for the Linux desktop.