29
Package Flutter Linux App Into AppImage Part 1
Flutter is one of the fastest-growing cross-platform UI frameworks with a great and powerful community which has a great part of Flutter success.
Lately, Flutter announced desktop support including Linux which got the attention of big corporates like Canonical (Publisher of Ubuntu), and lately announced that they are rebuilding Ubuntu Desktop Installer using Flutter.
Flutter official docs also have a section on how to build and package Flutter Linux app in Snap (Linux Universal Package Manager) and ship it to Snap Store. here
So it will be interesting if we tried to package Flutter Apps using another universal package manager which is AppImage.
Linux OS (I will use Manjaro)
Flutter with Linux config enabled ( assuming you have latest flutter stable version )
AppImage Tool
AppImage Builder
1- Install required deps
$ sudo pacman -Sy python-pip python-setuptools binutils patchelf desktop-file-utils gdk-pixbuf2 wget fakeroot strace
2 - Install Apimage Tool
$ sudo wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
$ sudo chmod +x /usr/local/bin/appimagetool
3 - Install AppImage Builder
sudo pip3 install appimage-builder
1 - install required deps for building flutter linux app
sudo pacman -Sy clang cmake ninja pkgconf gtk3
2 - Enable Flutter linux desktop configuration
$ flutter config --enable-linux-desktop
3 - Create flutter project flutter_appimage
$ flutter create flutter_appimage
3 - Build Linux App
$ (cd flutter_appimage && flutter build linux)
29