Reading time: 8 minutes
Introduction
App size matters — a lot more than most people realize. Users are quick to skip a download if it’s too big, especially in areas with slow connections or limited storage. Whether you’re building for global users or just aiming for better app store visibility, keeping your Flutter APK or IPA lightweight is essential in 2025.
I’ve worked with teams whose Flutter apps ballooned to 150MB — and we brought them down to 35MB without cutting a single feature. The trick isn’t magic; it’s about knowing where the bulk comes from and tackling it strategically.
In this guide, I’ll show you exactly how to reduce your app size step by step, with real examples, commands, and practical insights that actually make a difference.
Understanding Where the Size Comes From
Before you can fix it, you need to know what’s bloating your app. Typically, Flutter app size comes from four main sources: the Flutter engine (about 20–25MB), your code and assets, third-party packages, and native libraries.
On Android, the biggest culprit is the universal APK that includes every architecture — x86, x86_64, armeabi-v7a, and arm64-v8a — in one massive file. On iOS, unused frameworks and large asset bundles often go unnoticed and inflate your IPA size.
The good news? Flutter itself isn’t the problem. Most of the excess comes from default settings and underused optimization tools.
1. Use App Bundles and Split APKs on Android
This is your biggest win. Instead of bundling every architecture in one huge APK, build an Android App Bundle (AAB). The Play Store then serves optimized APKs for each user’s device automatically.
flutter build appbundle \ --target-platform android-arm,android-arm64 This simple command can shrink your app by 40–60% since users only download binaries that match their device. No more x86 downloads for arm64 phones.
If you distribute outside the Play Store, use split APKs instead:
flutter build apk --split-per-abi This generates smaller, architecture-specific APKs. Host them yourself or automate via your CI/CD pipeline. Your users get smaller downloads — and you get bonus points for professionalism.
2. Enable Shrinking and Obfuscation
Compiled Dart code isn’t always optimized out of the box. Enabling code shrinking removes unused parts of your codebase and libraries. Pair it with obfuscation to further minimize your app’s footprint.
In build.gradle, turn on ProGuard for your release builds:
buildTypes { release { shrinkResources true minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } Then, for Dart code, build with:
flutter build apk --obfuscate --split-per-abi Together, these can shave off 5–15% of your app’s size by stripping unused symbols and compressing your codebase.
3. Lazy Load Assets and Code
Not every piece of your app needs to load right away. If certain screens or modules are rarely used, defer their loading until needed.
You can use Dart’s deferred imports for this:
import 'package:heavy_feature/feature.dart' deferred as heavy_feature; void loadFeature() async { await heavy_feature.loadLibrary(); heavy_feature.startFeature(); } Apply the same principle to large assets. Store big files on a CDN and fetch them the first time they’re needed. Cache them locally afterward for seamless reuse. Breaking up your asset loading like this can improve first install times dramatically.
4. Audit and Replace Heavy Packages
Every dependency adds weight. Some packages are optimized, but others carry old or unnecessary code. It’s worth doing a quick audit.
List your dependencies:
flutter pub deps --style=compact Then use DevTools for a deeper inspection:
flutter pub global activate devtools pub global run devtools Watch for bloated image libraries, duplicate animation tools, or unused SDKs. Replacing a heavy dependency with a lighter one can save 5–10MB easily. For instance, cached_network_image often outperforms bulkier image caching packages.
5. Optimize Images and Assets
Images are usually the biggest contributors to app size. Choose the right formats: JPEG for photos, PNG for simple graphics, and WebP for mixed content. Avoid BMPs and uncompressed files entirely.
Use tools like ImageOptim, PNGQuant, or TinyPNG to compress before adding them to your project. For scalable graphics, use SVGs with flutter_svg instead of multiple-resolution PNGs — they’re lighter and look better on any screen.
Finally, clean up your pubspec.yaml — remove any assets you’re not actually using. Every unused file is wasted space.
6. Remove Unnecessary Dependencies and Capabilities
On iOS, unused frameworks can bloat your build. Go to Xcode → Build Phases and remove any you don’t use. On Android, clean your AndroidManifest.xml — extra permissions and features take up unnecessary bytes and may even raise privacy flags.
Also review your build.gradle for outdated or redundant dependencies. It’s common to find multiple libraries doing the same job — keep the leanest one.
Pro Tips for Maximum Results
Measure everything: Run flutter build apk --analyze-size or use Xcode’s build analyzer. You can’t improve what you don’t measure.
Automate checks: Add APK size analysis to your CI/CD pipeline and get notified when builds exceed a size limit.
Test locally: Always install your split APKs or AABs on real devices before release.
Version your assets: Use CDN versioning so users don’t redownload outdated files after updates.
Case Study: Reducing a Travel App’s Size
One project I worked on — a travel app — started at 142MB. Here’s what we did:
- Switched to App Bundles — dropped 42MB instantly.
- Converted JPEGs to WebP and deleted unused assets — saved 20MB.
- Replaced a bulky map library with Google Maps — minus 12MB.
- Deferred offline maps until user request — another 15MB deferred.
Total reduction: 53MB — a 63% improvement. The best part? We didn’t cut any features. The app just became faster to install and lighter to update.
Best Practices for Staying Lean
Make optimization part of your workflow, not a last-minute fix. Run flutter build apk --analyze-size regularly, compress assets before committing, and always review package sizes before adding new ones.
Set expectations with your team — if the base app is 40MB, every new feature should justify its size. For large features, lazy-load them. You can even use build flavors for “lite” and “pro” versions without duplicating code.
Conclusion
Reducing your Flutter app size isn’t about one big trick — it’s about consistent, smart choices. Start with App Bundles (that’s your biggest win), then tackle code shrinking, asset compression, and lazy loading.
The payoff? Faster installs, better user retention, and improved rankings. Your users — especially those on limited connections — will thank you.
Try this now: Run flutter build appbundle on your app and check the size report. Pick one optimization from this guide and apply it today — you’ll see results right away.
FAQ
Q: Will obfuscation break my app?
A: No. It only renames variables and functions. Just test your release build as usual.
Q: Can I use App Bundles outside Google Play?
A: Not directly. Most stores don’t support AABs, but you can use split APKs and host them yourself.
Q: How much can I expect to save?
A: Most apps shrink 30–60% after full optimization, depending on assets and dependencies.
Q: Does lazy loading hurt UX?
A: Not if done smartly. Preload in the background or show brief spinners only when needed.
Q: What’s the biggest single improvement?
A: Definitely App Bundles — typically a 40–50% size cut with one command.