flutter-app-size
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-sizeand 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:ioPlatform checks - Provides iOS-specific Xcode App Thinning Size Report generation for accurate end-user download estimates
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:
- 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.
- Yes: Run
- Is the user measuring iOS?
- Yes: Run
flutter build ipa --export-method developmentand generate an Xcode App Thinning Size Report for accurate download estimates.
- Yes: Run
- Is the user analyzing the breakdown of components?
- Yes: Launch
dart devtools, open the App Size Tool, and upload the generated*-code-size-analysis_*.jsonfile.
- Yes: Launch
- Is the user applying size reduction strategies?
- Yes: Apply
--split-debug-info, compress assets, and implementPlatformchecks for aggressive tree-shaking.
- Yes: Apply
Instructions
More from flutter/skills
flutter-building-layouts
Builds Flutter layouts using the constraint system and layout widgets. Use when creating or refining the UI structure of a Flutter application.
10.6Kflutter-architecting-apps
Architects a Flutter application using the recommended layered approach (UI, Logic, Data). Use when structuring a new project or refactoring for scalability.
10.4Kflutter-animating-apps
Implements animated effects, transitions, and motion in a Flutter app. Use when adding visual feedback, shared element transitions, or physics-based animations.
9.6Kflutter-managing-state
Manages application and ephemeral state in a Flutter app. Use when sharing data between widgets or handling complex UI state transitions.
9.6Kflutter-theming-apps
Customizes the visual appearance of a Flutter app using the theming system. Use when defining global styles, colors, or typography for an application.
9.5Kflutter-implementing-navigation-and-routing
Handles routing, navigation, and deep linking in a Flutter application. Use when moving between screens or setting up URL-based navigation.
9.3K