Flutter 3.41 is live! Check out theFlutter 3.41 blog post!
Build Linux apps with Flutter
Platform-specific considerations when building for Linux with Flutter.
This page discusses considerations unique to building Linux apps with Flutter, including shell integration and preparation of apps for distribution.
Integrate with Linux
# The Linux programming interface, comprising library functions and system calls, is designed around the C language and ABI. Fortunately, Dart provides thedart:ffi package, which enables Dart programs to call into C libraries.
Foreign Function Interfaces (FFI) allow Flutter apps to perform the following with native libraries:
- allocate native memory with
mallocorcalloc - support pointers, structs, and callbacks
- support Application Binary Interface (ABI) types like
longandsize_t
To learn more about calling C libraries from Flutter, consultC interop usingdart:ffi.
Many apps benefit from using a package that wraps the underlying library calls in a more convenient, idiomatic Dart API.Canonical has built a series of packages with a focus on enabling Dart and Flutter on Linux, including support for desktop notifications, dbus, network management, and Bluetooth.
In general, many otherpackages support creating Linux apps, including common packages such asurl_launcher,shared_preferences,file_selector, andpath_provider.
Prepare Linux apps for distribution
# The executable binary can be found in your project underbuild/linux/x64/<build mode>/bundle/. Alongside your executable binary in thebundle directory, you can find two directories:
libcontains the required.solibrary filesdatacontains the application's data assets, such as fonts or images
In addition to these files, your application also relies on various operating system libraries against which it's been compiled. To see the full list of libraries, use theldd command on your application's directory.
For example, assume you have a Flutter desktop application calledlinux_desktop_test. To inspect the its system library dependencies, use the following commands:
flutter build linux --releaseldd build/linux/x64/release/bundle/linux_desktop_test To wrap up this application for distribution, include everything in thebundle directory and verify the target Linux system has all required system libraries.
This might only require using the following command.
sudo apt-get install libgtk-3-0 libblkid1 liblzma5To learn how to publish a Linux application to theSnap Store, consultBuild and release a Linux application to the Snap Store.
Additional resources
# To learn how to create Linux Debian (.deb) and RPM (.rpm) builds of your Flutter desktop app, consult the step-by-stepLinux packaging guide.
Unless stated otherwise, the documentation on this site reflects Flutter 3.38.6. Page last updated on 2025-09-05.View source orreport an issue.