flutter-app-size

Installation
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

Installs
1.0K
Repository
flutter/skills
GitHub Stars
2.4K
First Seen
Mar 4, 2026
flutter-app-size — flutter/skills