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.
Requirments :
Linux OS (I will use Manjaro)
Flutter with Linux config enabled ( assuming you have latest flutter stable version )
AppImage Tool
AppImage Builder
Install AppImage Tool and 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
Create and build Flutter Linux app
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)
Top comments (1)
I have successfully created my first .AppImage for my software, following this tutorial : How to create an AppImage to bundle your software this was done on Ubuntu Linux