flutter-app-size

Installation
Summary

Measure and optimize Flutter app bundle, APK, or IPA size with platform-specific analysis and reduction strategies.

  • Supports Android (APK/AppBundle), iOS (IPA), and desktop platforms (Linux, macOS, Windows) with platform-specific measurement workflows
  • Generates code size analysis JSON files via flutter build --analyze-size and integrates with Dart DevTools App Size Tool for component breakdown visualization
  • Implements size reduction through debug info splitting, asset compression, and platform-specific tree-shaking using dart:io Platform checks
  • Provides iOS-specific Xcode App Thinning Size Report generation for accurate end-user download estimates
SKILL.md

flutter-app-size-optimization

Goal

Analyzes and optimizes Flutter application size by measuring build artifacts, generating size analysis reports, utilizing Dart DevTools for component breakdown, and implementing specific size reduction strategies such as debug info splitting, resource compression, and platform-specific tree-shaking. Assumes a configured Flutter environment and target platform availability.

Decision Logic

Use the following decision tree to determine the correct measurement and optimization path:

  1. Is the user measuring Android or Desktop (Linux/macOS/Windows)?
    • Yes: Run flutter build <platform> --analyze-size. Proceed to DevTools analysis.
    • No: Proceed to step 2.
  2. Is the user measuring iOS?
    • Yes: Run flutter build ipa --export-method development and generate an Xcode App Thinning Size Report for accurate download estimates.
  3. Is the user analyzing the breakdown of components?
    • Yes: Launch dart devtools, open the App Size Tool, and upload the generated *-code-size-analysis_*.json file.
  4. Is the user applying size reduction strategies?
    • Yes: Apply --split-debug-info, compress assets, and implement Platform checks for aggressive tree-shaking.

Instructions

Related skills
Installs
1.0K
Repository
flutter/skills
GitHub Stars
1.9K
First Seen
Mar 4, 2026