Flutter application

Hi all! I’m new here.
I have a question: is it possible to create a Flatpack version of an app made with Flutter? I could not find any info or examples.
I’ve created a snap version but they have a plugin specifically made to support Flutter. Not sure if I need something like it with Flatpack.

2 Likes

Hi,
Definitely!

Here’s an example:

However, it doesn’t seem as straightforward yet and I wasn’t able to find any guides online.

Making it easier to package up Flutter apps was mentioned over on Ideas on growing the Flathub Community in 2022 - #8 by castrojo.

2 Likes

Two more examples (sorry, this forum only allows 2 links per post):

2 Likes

Many thanks for the pointers! It’s been a year since I asked that question and actually forgot about it :slight_smile: At the moment my project is on hold but I’ll try to get back to it and package it as a flatpack.

2 Likes

Hey there! I am the developer of Passy - offline password manager with cross-platform synchronization. My app is built on Flutter and published on flathub at Flathub—An app store and build service for Linux.
Here’s the repository for it:
GitHub - flathub/io.github.glitterware.Passy

The only way I found so far was to use a prebuilt binary package for flatpak. I was not able to find a way to easily build flutter apps on flatpak, as Flutter tool needs internet access to download dart binaries, which flatpak does not allow, every download must be done using sources. It might be possible to download dart binaries separately and extract them into the flutter tool, but I haven’t tried nor have seen anyone else try this yet, so cannot confirm this possibility.

On second thought, even if Dart binaries are pre-downloaded, it would not be possible to build the app, since the project dependencies need to be downloaded too. So yes, as it is at the moment, it is not possible to conveniently build a Flutter app using flatpak, the only way is to pre-build the app and include all the Linux assets (.desktop file, appstream metadata, icon, etc.) inside of the build.

You can view my linux build script at Passy/build_all.sh at main · GlitterWare/Passy · GitHub. The function of interest to you would be build_linux(), since this is where the Linux assets are copied into the build directory. Good luck!

Can you send me the file to my WA MA…?