Shrink Your Flutter App Like a Pro: 15 Proven Tips to Reduce APK & IPA Size
Teqani Blogs
Writer at Teqani
Is your Flutter app too large? A large app size can negatively impact user experience, leading to fewer installs and lower retention. This article provides 15 proven tips to drastically reduce your Flutter APK & IPA size, potentially by 40-70%.
Why Should You Care About App Size?
- Faster installs = More users
- Less device clutter = Happier retention
- Smaller apps = Higher Play Store rankings
- Essential in low-end and limited-data markets
1. Start by Measuring — Size First, Slice Later
Run the following commands to analyze your app's size:
flutter build apk --analyze-size
flutter build ios --analyze-size
Open the .json
file in Dart DevTools to see a breakdown of assets, fonts, dependencies, native libs, and Dart code. Target the largest chunks first.
2. Remove Unused Packages, Fonts & Assets
Audit your pubspec.yaml
file and remove any unnecessary dependencies, fonts, and assets. Only include essential fonts and styles.
3. Enable Tree Shaking for Icons
Icon packages can significantly increase your app size. Use the following command to remove unused icons:
flutter build apk --release --tree-shake-icons
This can save 5–8 MB.
4. Split APKs by ABI (Android only)
Why send all CPU architectures in one file? Use the following command:
flutter build apk --split-per-abi
This can result in a 60–70% size drop per APK, especially for devices with arm64-v8a.
5. iOS Tricks to Reduce IPA Size
- Avoid bundling static assets unless necessary.
- Strip debug symbols:
flutter build ios --release
- Disable Bitcode (if not required).
- Remove dev-only logging/images.
6. Resize & Compress Images
Images are size hogs. Convert .png
to .webp
and resize to the device target size. Use tools like TinyPNG or ImageOptim.
7. Lazy Load Large Assets
Don’t bundle everything upfront. Use flutter_cache_manager
to load images, videos, and docs only when needed. This also helps with app startup performance.
8. Use Deferred Components & On-Demand Modules
For large apps, modular delivery is a game-changer. Split onboarding, tutorials, and AR/ML features into separate modules.
9. Obfuscate Dart Code (Bonus: Smaller Size)
This improves security and reduces build size.
flutter build apk --release --obfuscate --split-debug-info=debug-info/
Keep your debug info safe!
10. Clean Builds Regularly
Old artifacts can lead to unnecessary bloat.
flutter clean
flutter pub get
flutter build apk --release
11. Prefer Code Over Packages (When Sensible)
Do you really need a package for 10 lines of Dart? Replacing bloated packages with native code or simple Dart logic can save hundreds of KBs.
12. Minimize Dependencies in Plugins
Audit plugin usage. Does the plugin import unnecessary platform code? Can it be replaced with a leaner one or pure Dart? Check .dart_tool/package_config.json
for dependency bloat.
13. Avoid Material Icons If Not Used
Using MaterialApp
with no icons? You’re still shipping them. Instead, use WidgetsApp(...)
or selectively import icon sets.
14. Compress JSON or Large Strings
For big JSON strings, use GZIP compression and decode on device or move to remote config/lazy fetch.
15. Use Lottie Animations Sparingly
Those .json
Lottie files are cool but can be bulky. Convert to .webp
looped animations if performance or size is an issue.
Optimize for reality, not perfection. A conscious balance between size, performance, and user experience is key. Small apps convert better, retain longer, and feel snappier.
All blogs are certified by our company and reviewed by our specialists
Issue Number: #7056b4ce-2d33-4e96-a339-cb737837cbd7