Skip to content

Flutter dev on Fedora35

Fedora 35

As many who know me know, I use Linux as a daily driver on my trusty old Thinkpad T470 as well as I’ve been dual-booting on my desktop machine. But I’ve been stuck in the Ubuntu distro for such a long time that I decided the other day to try switching it up a bit. So I tried Fedora 35 since it has one of the most up-to-date Gnome3 installs I know of.

Everything in Fedora 35 is wonderful I have to say! Nothing is broken, everything is fairly up to date and I have no complaints about anything. So I decide to change it up a bit more and I plan to use this laptop as my main Flutter development machine. And since I have yet to set up a Flutter dev environment on Fedora, I thought it might be good to document here how it went.

The official guide

The official guide is what is best to follow and therefore I started there. I prefer to download the tarball myself instead of using snap so that’s where I start in the guide.

Everything goes swimmingly, I download the Flutter package, modify my path, run flutter precache and then flutter doctor. It of course shows me errors since I don’t have Android Studio installed and more, but that’s the next step.

I download Android Studio and install it, approve all the licenses by running:

flutter doctor --android-licenses

And after that, I run Flutter doctor again to see what was needed. And if you’re new to Linux and are using anything other than an Ubuntu-based Linux distribution, this is where you might get into some issues.
You see, the official Flutter guide only shows you a command to install the necessary Linux software and tools in Ubuntu-based distros:

sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev

Well, since Fedora doesn’t use apt-get, what are the packages to install then?

sudo dnf update
sudo dnf upgrade
sudo dnf install clang cmake ninja-build gtk3-devel

By running these commands in that order we update the cache, upgrade the system and then finally install the packages that the apt-get command above mentioned. As you can see, some of the packages have the same name and/or are similar to the ones above.

Now what?

Let’s get to coding!