Flutter release to linux

1,857

This is an official guide how to build and release production Flutter desktop app to Linux Snap Store: https://flutter.dev/docs/deployment/linux

If you just want to build e.g. Linux version and run it locally then try this:

flutter build linux

You'll find the executable in build/linux/release/bundle directory

Share:
1,857
Ahmadi Alpasyri
Author by

Ahmadi Alpasyri

Updated on December 21, 2022

Comments

  • Ahmadi Alpasyri
    Ahmadi Alpasyri over 1 year

    I have created a flutter app for Linux. but how to release flutter to Linux or windows.?

    You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
    If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
        To generate an app bundle, run:
            flutter build appbundle --target-platform android-arm,android-arm64,android-x64
            Learn more on: https://developer.android.com/guide/app-bundle
        To split the APKs per ABI, run:
            flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
            Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
    Running Gradle task 'assembleRelease'...                                
    Running Gradle task 'assembleRelease'... Done   
    
  • Eric Aya
    Eric Aya about 2 years
    This has already been mentioned in the other answers.
  • Haidar
    Haidar about 2 years
    what do you mean by But remember both linux and windows are in developer preview so don't use it for production application. ? so If I want to distribute the app only locally (i.e. using an executable file) then this is not the way to do it?
  • Sachin Bhankhar
    Sachin Bhankhar about 2 years
    it's a old answer, now flutter desktop is stable so you can refer to flutter website for docs docs.flutter.dev/deployment/windows