Comprehensive guide for deploying Flutter applications to all platforms including Android, iOS, web, and desktop. Covers build configuration, code signing, app store submission, CI/CD automation, and production best practices. Use when preparing for release or setting up deployment pipelines.
From flutter-corenpx claudepluginhub aaronbassett/agent-foundry --plugin flutter-coreThis skill uses the workspace's default tool permissions.
examples/ci-workflow.mdexamples/release-checklist.mdreferences/android-release.mdreferences/ci-cd-pipelines.mdreferences/code-signing.mdreferences/desktop-deployment.mdreferences/flavors-configs.mdreferences/ios-release.mdreferences/web-deployment.mdSearches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Guides agent creation for Claude Code plugins with file templates, frontmatter specs (name, description, model), triggering examples, system prompts, and best practices.
Comprehensive guide for deploying Flutter applications to all platforms including mobile (Android, iOS), web, and desktop (Windows, macOS, Linux). Covers build configuration, code signing, app store submission, CI/CD automation, and production best practices.
Use this skill when:
Flutter supports three compilation modes optimized for different stages:
Debug Mode - Active development with hot reload
flutter runProfile Mode - Performance analysis
Release Mode - Production deployment
flutter run # debug mode
flutter run --profile # profile mode
flutter run --release # release mode
flutter build <target> # builds in release mode
Each platform has specific build commands and outputs:
# Mobile
flutter build apk # Android APK
flutter build appbundle # Android App Bundle (preferred)
flutter build ipa # iOS App Store package
# Web
flutter build web # Static web files
# Desktop
flutter build windows # Windows executable
flutter build macos # macOS application bundle
flutter build linux # Linux executable
Version numbers follow semantic versioning with build numbers:
# pubspec.yaml
version: 1.2.3+45
Format: MAJOR.MINOR.PATCH+BUILD_NUMBER
Override during build:
flutter build appbundle --build-name=1.2.3 --build-number=45
Platform-specific considerations:
versionCode must be unique integer for each uploadProtect Dart code by obscuring function and class names:
flutter build appbundle \
--obfuscate \
--split-debug-info=out/android
Important notes:
Use flutter symbolize to decode obfuscated stack traces:
flutter symbolize -i stack_trace.txt -d out/android
Prerequisites:
build.gradle filesKey steps:
key.propertiesbuild.gradle.ktsRecommended build:
flutter build appbundle --release
Output: build/app/outputs/bundle/release/app.aab
Prerequisites:
Key steps:
Build command:
flutter build ipa --release
Output: build/ios/ipa/*.ipa
Build command:
flutter build web --release
Output: build/web/ directory with static files
Hosting options:
PWA configuration:
web/manifest.json for app metadataflutter_service_worker.js for cachingWindows:
.exemsix pub package for packagingflutter build windows --release
macOS:
flutter build macos --release
Linux:
flutter build linux --release
Build flavors allow different configurations for development, staging, and production:
Benefits:
Android configuration:
// android/app/build.gradle.kts
android {
flavorDimensions += "default"
productFlavors {
create("dev") {
dimension = "default"
applicationIdSuffix = ".dev"
resValue("string", "app_name", "MyApp Dev")
}
create("staging") {
dimension = "default"
applicationIdSuffix = ".staging"
resValue("string", "app_name", "MyApp Staging")
}
create("prod") {
dimension = "default"
resValue("string", "app_name", "MyApp")
}
}
}
iOS configuration:
Create schemes in Xcode for each flavor with different configurations and build settings.
Running flavors:
flutter run --flavor dev
flutter build appbundle --flavor prod
Create .github/workflows/deploy.yml:
name: Deploy Flutter App
on:
push:
branches: [ main ]
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.38.6'
- run: flutter pub get
- run: flutter test
- run: flutter build appbundle --release
- name: Upload to Play Store
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: com.example.app
releaseFiles: build/app/outputs/bundle/release/app.aab
track: internal
Configure via codemagic.yaml or web UI:
workflows:
ios-workflow:
name: iOS Workflow
environment:
flutter: stable
xcode: latest
scripts:
- flutter pub get
- flutter test
- flutter build ipa --release
artifacts:
- build/ios/ipa/*.ipa
publishing:
app_store_connect:
api_key: $APP_STORE_CONNECT_PRIVATE_KEY
submit_to_testflight: true
Install in both android/ and ios/ directories:
cd android && fastlane init
cd ios && fastlane init
Android Fastfile:
lane :deploy do
gradle(task: "clean bundleRelease")
upload_to_play_store(
track: 'internal',
aab: '../build/app/outputs/bundle/release/app.aab'
)
end
iOS Fastfile:
lane :deploy do
build_app(
scheme: "Runner",
export_method: "app-store"
)
upload_to_testflight
end
pubspec.yaml--split-debug-info to separate debug symbolsflutter build --analyze-size for size analysisgit tag v1.2.3# Build and test release builds locally
flutter build apk --release
flutter install
# Profile performance
flutter run --profile
flutter build apk --profile
# Check app size
flutter build apk --analyze-size
Issue: Build fails with signing error (Android)
key.properties file exists and is referencedstoreFile path is correctIssue: iOS build fails with provisioning profile error
Issue: App rejected from store
Issue: Large app size
--split-per-abi for Android APKsIssue: Obfuscated stack traces unreadable
--split-debug-info output directoryflutter symbolize with saved symbols# Build commands
flutter build apk --release # Android APK
flutter build appbundle --release # Android bundle
flutter build ipa --release # iOS
flutter build web --release # Web
flutter build windows --release # Windows
flutter build macos --release # macOS
flutter build linux --release # Linux
# With obfuscation
flutter build appbundle --obfuscate --split-debug-info=out/
# With flavors
flutter build appbundle --flavor prod --release
# Version override
flutter build appbundle --build-name=1.2.3 --build-number=45
# Analyze size
flutter build apk --analyze-size
Android APK: build/app/outputs/apk/release/
Android Bundle: build/app/outputs/bundle/release/
iOS: build/ios/ipa/
Web: build/web/
Windows: build/windows/runner/Release/
macOS: build/macos/Build/Products/Release/
Linux: build/linux/<arch>/release/bundle/
For detailed platform-specific guidance, see the reference files in this skill.