flet build
Build a Flet Python app into a platform-specific executable or installable bundle. It supports building for desktop (macOS, Linux, Windows), web, Android (APK/AAB), and iOS (IPA and simulator .app), with a wide range of customization options for metadata, assets, splash screens, and signing.
Arguments after -- are passed down to the underlying flutter build.
Detailed usage guide: https://flet.dev/docs/publish.
Usage
flet build [-h] [-v] [-o OUTPUT_DIR]
[--arch TARGET_ARCH [TARGET_ARCH ...]]
[--exclude EXCLUDE [EXCLUDE ...]]
[--include INCLUDE [INCLUDE ...]] [--no-default-excludes]
[--project PROJECT_NAME] [--artifact ARTIFACT_NAME]
[--description DESCRIPTION] [--product PRODUCT_NAME]
[--org ORG_NAME] [--bundle-id BUNDLE_ID]
[--company COMPANY_NAME] [--copyright COPYRIGHT]
[--android-adaptive-icon-background ANDROID_ADAPTIVE_ICON_BACKGROUND]
[--linux-categories LINUX_CATEGORIES [LINUX_CATEGORIES ...]]
[--splash-color SPLASH_COLOR]
[--splash-dark-color SPLASH_DARK_COLOR] [--no-web-splash]
[--no-ios-splash] [--no-android-splash]
[--ios-team-id IOS_TEAM_ID]
[--ios-export-method IOS_EXPORT_METHOD]
[--ios-provisioning-profile IOS_PROVISIONING_PROFILE]
[--ios-signing-certificate IOS_SIGNING_CERTIFICATE]
[--base-url BASE_URL] [--web-renderer {auto,canvaskit,skwasm}]
[--route-url-strategy {path,hash}]
[--pwa-background-color PWA_BACKGROUND_COLOR]
[--pwa-theme-color PWA_THEME_COLOR]
[--pwa-short-name PWA_SHORT_NAME] [--no-wasm] [--no-cdn]
[--split-per-abi]
[--android-legacy-packaging | --no-android-legacy-packaging]
[--compile-app | --no-compile-app]
[--compile-packages | --no-compile-packages]
[--swift-package-manager | --no-swift-package-manager]
[--impeller | --no-impeller] [--cleanup-app]
[--cleanup-app-files CLEANUP_APP_FILES [CLEANUP_APP_FILES ...]]
[--cleanup-packages]
[--cleanup-package-files CLEANUP_PACKAGE_FILES [CLEANUP_PACKAGE_FILES ...]]
[--flutter-build-args [FLUTTER_BUILD_ARGS ...]]
[--source-packages SOURCE_PACKAGES [SOURCE_PACKAGES ...]]
[--android-extract-packages ANDROID_EXTRACT_PACKAGES [ANDROID_EXTRACT_PACKAGES ...]]
[--python-version PYTHON_VERSION]
[--info-plist INFO_PLIST [INFO_PLIST ...]]
[--macos-entitlements MACOS_ENTITLEMENTS [MACOS_ENTITLEMENTS ...]]
[--ios-entitlements IOS_ENTITLEMENTS [IOS_ENTITLEMENTS ...]]
[--android-features ANDROID_FEATURES [ANDROID_FEATURES ...]]
[--android-permissions ANDROID_PERMISSIONS [ANDROID_PERMISSIONS ...]]
[--android-meta-data ANDROID_META_DATA [ANDROID_META_DATA ...]]
[--permissions {location,camera,microphone,photo_library} [{location,camera,microphone,photo_library} ...]]
[--deep-linking-scheme DEEP_LINKING_SCHEME]
[--deep-linking-host DEEP_LINKING_HOST]
[--android-signing-key-store ANDROID_SIGNING_KEY_STORE]
[--android-signing-key-store-password ANDROID_SIGNING_KEY_STORE_PASSWORD]
[--android-signing-key-password ANDROID_SIGNING_KEY_PASSWORD]
[--android-signing-key-alias ANDROID_SIGNING_KEY_ALIAS]
[--macos-signing-identity MACOS_SIGNING_IDENTITY]
[--macos-distribution {none,developer-id,app-store}]
[--macos-notary-profile MACOS_NOTARY_PROFILE]
[--macos-provisioning-profile MACOS_PROVISIONING_PROFILE]
[--macos-installer-identity MACOS_INSTALLER_IDENTITY]
[--build-number BUILD_NUMBER] [--build-version BUILD_VERSION]
[--module-name MODULE_NAME] [--template TEMPLATE]
[--template-dir TEMPLATE_DIR] [--template-ref TEMPLATE_REF]
[--show-platform-matrix] [--log-format {rich,plain,github}]
[--no-rich-output] [--yes] [--skip-flutter-doctor]
{macos,linux,windows,web,apk,aab,ipa,ios-simulator}
[python_app_path]
Positional arguments
target_platform
The target platform or type of package to build.
Possible values: aab, apk, ios-simulator, ipa, linux, macos, web, windows
Required: true
python_app_path
Path to a directory with a Flet Python program.
Default: .
Options
--android-adaptive-icon-background
The color to be used to fill out the background of Android adaptive icons.
--android-extract-packages
Android only: Python packages (relative paths) to ship extracted to disk instead of inside the app zip — for packages that read bundled data via file / pkg_resources rather than importlib.resources.
Value: ANDROID_EXTRACT_PACKAGES+