There is nothing that kills user conversion faster than a 100MB download for a simple utility app. When I first started with cross-platform development, I was shocked by how quickly a ‘Hello World’ project could balloon into a massive binary. If you’re wondering how to reduce flutter app size, you’re not alone—it’s one of the most common hurdles in moving from a prototype to a production-ready product.

Over the last few years of building production apps, I’ve found that app size isn’t just about the code; it’s a combination of how you handle assets, which build commands you use, and how you manage dependencies. Reducing your footprint not only improves download rates but also contributes to overall flutter performance optimization by reducing the memory overhead.

1. Use App Bundles (.aab) Instead of APKs

If you are still uploading .apk files to the Google Play Store, you are essentially forcing every user to download code for every possible device architecture (arm64, armeabi-v7a, x86_64). By switching to the Android App Bundle (.aab), Google Play generates optimized APKs tailored to the specific device downloading the app.

# Instead of: flutter build apk
# Use this command:
flutter build appbundle

2. Run the Flutter Size Analysis Tool

You can’t fix what you can’t measure. Flutter provides a built-in tool to analyze exactly which packages or assets are eating up your space. I always run this before any major release to spot ‘bloat’ introduced by new dependencies.

flutter build apk --analyze-size

This command generates a JSON file that you can upload to the DevTools Size Analysis tab, giving you a visual breakdown of the binary. As shown in the analysis tool, you’ll often find that a single oversized image or an unused font is the primary culprit.

Flutter DevTools Size Analysis window showing a treemap of APK components
Flutter DevTools Size Analysis window showing a treemap of APK components

3. Compress Your Assets (The Low-Hanging Fruit)

High-resolution PNGs and JPEGs are the fastest way to bloat your app. In my experience, switching to WebP format can reduce image size by 30-50% without a perceptible loss in quality. Use tools like Squoosh.app or TinyPNG before adding files to your assets/ folder.

4. Use SVGs for Vector Graphics

Stop using PNGs for icons. Not only do they scale poorly, but they also take up significantly more space. The flutter_svg package allows you to use scalable vector graphics, which are essentially text files and take up kilobytes instead of megabytes.

5. Tree Shaking and Obfuscation

Flutter performs ‘tree shaking’ by default in release mode, removing unused code. However, you can further shrink your binary and protect your source code by using obfuscation. This removes unnecessary symbols from the compiled code.

flutter build apk --obfuscate --split-debug-info=/

6. Optimize Fonts

Adding a full Google Font library can add several megabytes to your app. Instead of bundling every weight (Thin, Light, Medium, Bold, Black), only include the specific weights your UI actually uses. If possible, use google_fonts package to fetch fonts at runtime, though this requires a network connection.

7. Avoid Unnecessary Dependencies

Every package you add to pubspec.yaml potentially adds to your app size. I’ve seen developers add a massive library just to use one helper function. Before adding a dependency, ask yourself: “Can I write this 20-line function myself?”

8. Implement On-Demand Loading

Not every user needs every asset immediately. For large apps, consider downloading heavy assets (like onboarding videos or high-res galleries) from a CDN after the app has installed. This keeps the initial download small and improves the ‘Time to First Interaction’.

9. Proactive Update Management

Keeping your Flutter SDK and packages updated often leads to size reductions. The Flutter team constantly optimizes the engine. If you’re struggling with size, ensure you’re on the latest stable channel. For those who need to push updates without requiring a full app store re-download, I highly recommend reading my shorebird flutter review to see how code pushing works.

10. Split by Architecture

If you must distribute APKs directly (e.g., via a website), don’t provide one ‘fat’ APK. Split them by architecture so the user only downloads what their hardware supports.

flutter build apk --split-per-abi

Common Mistakes When Reducing Size

Measuring Your Success

To truly understand the impact of these changes, I recommend creating a simple spreadsheet. Log the ‘App Size’ (compressed download size) after each major optimization. You’ll likely see the biggest drops from switching to App Bundles and optimizing images. If you’re still seeing lag despite a smaller size, refer back to our guide on flutter performance optimization.

Ready to ship a lean app? Start by running the size analysis tool today and see where your bloat is hiding!