After a painful hour of searching for dependencies, I was finally able to get Flutter's desktop support (compile to Linux) running on my computer. Flutter itself has a tutorial for this, but that's mostly for Ubuntu/Debian users and it's usually very hard to figure out what dependencies you actually need. For future reference and to save other Flutter devs' time, I decided to write a small tutorial on how to enable this feature (mainly on the dependencies part):
Assume you already have the Flutter SDK installed and running. Desktop support for Linux require the following dependencies:
Clang
CMake
ninja-build
pkg-config
libgtk-3-dev
liblzma-dev
if you didn't use snap and installed Flutter manually by downloading the SDK directly
However, as mentioned above, this was not written for Solus users. On Solus OS, they are actually these:
llvm-clang
cmake
ninja
pkg-config
libgtk-3-devel
xz-devel
You should have ninja
, cmake
, and pkg-config
already installed if you have run sudo eopkg it -c system.devel
to install dependencies for Flutter. Just in case, still run sudo eopkg it -c system.devel
, and then followed by:
sudo eopkg it llvm-clang libgtk-3-devel xz-devel
You're all done with the dependencies! Then, just like Flutter's official tutorial, run flutter config --enable-linux-desktop
to actually enable desktop support.
Finally, run flutter doctor
to see if there are any problems. You should get a line like this:
[✓] Linux toolchain - develop for Linux desktop
All set! Happy coding, Flutter devs!