To all publishers of Flutter apps, let's build from source!

Hi fellow Flutter developers and Flutter app publishers,

I’m the developer of Community Remote, an app built using the Flutter framework.

Over the last couple of weeks I figured out how to build a Flutter app from source while being offline, to be able to perform the full app build on Flathub infra. Recently I published an update of my app that is built from source.

To be of benefit to more Flutter developers who publish on Flathub I now generalized and automated parts of the process to come to an offline build, and open sourced this in the form of the flatpak-flutter tool.

Feature Highlights

  • Use an online build to generate prerequisite files for offline build
  • Generate flatpak-builder modules, snapshotting a specific version of the Flutter SDK
  • Generate flatpak-builder sources, parsing pubspec.lock files to create the offline pub-cache

What’s Next?

Be aware that this project is very fresh. To bring it to the next level I would like to get in contact with developers who want to test the tool and turn their app manifest into a source level build. It has the benefit to have both the x86_64 and aarch64 architecture supported without the need for local hardware.

Please create issues on the GitHub project for support and requests. This post is mainly to announce the project and create awareness.

Hope to hear from you!

1 Like

I am working on an app with Flutter, and will need to look in to a Flathub version. I am an experienced Flutter dev and would like to document the process for building Locally on Flathub. Is there a Discord where we can meet? I have a server ready to go.

Also I’d like to translate the overall process for Flutter Flathub to Electron apps as I have an active app in Flathub that is Electron based.

Flathub debugging is also very important, need to see which debugger is best to use with Flutter.

As this is a project I run in my spare time, I can only help with concrete questions. It starts off by looking into it yourself, as you mentioned. The approach I would suggest is:

  • Create a Flatpak manifest with a binary build of your app
  • Read the flatpak-flutter documentation
  • Convert the manifest to a source build
  • Report any issues you run into on the GitHub of the project.