Software Development

What is the best way to reduce the APK and IPA size of a Flutter application?

JO Asked by Joseph Anderson · 05-06-2025
0 upvotes 16,614 views 0 comments
The question

My simple Flutter app is hitting 30MB for a basic CRUD tool, which seems excessive compared to native. I've already tried the --split-per-abi flag for Android, but my iOS build is still quite large. Are there specific ways to "tree-shake" unused icons or optimize the Skia/Impeller engine components to bring the download size down for users in low-bandwidth areas?

3 answers

0
PA
Answered on 07-06-2025

The base size of Flutter is about 4-5MB because it bundles the C++ engine. To shrink the rest, start by auditing your assets. Use 'flutter_launcher_icons' carefully and compress all images using WebP format. In a 2023 audit, I found that removing unused Google Fonts and specifically defining only the needed weights saved us 4MB alone. Also, make sure you aren't bundling large JSON files in your 'assets' folder; instead, fetch them from a CDN. Lastly, use the 'analyze-size' flag during build to see exactly which packages are the heaviest.

0
JA
Answered on 08-06-2025

Are you using many third-party packages? Every time you add a library, you're potentially pulling in native dependencies that don't always get stripped out during the compilation process.

JO 10-06-2025

James, I actually have about 15 dependencies including Firebase and some UI kits. I noticed that 'material_design_icons_flutter' adds a lot of weight. Is there a way to only include the specific icons I'm using? I’ve seen some articles on icon tree-shaking, but I’m not sure if it’s enabled by default in the latest stable channel or if I need to add a specific flag in the pubspec.yaml.

0
SU
Answered on 11-06-2025

ProGuard and R8 for Android are essential. They don't just shrink the code; they also obfuscate it, which is great for security. Make sure your 'proguard-rules.pro' is set up.

PA 12-06-2025

Susan is spot on. For iOS, also ensure you're doing a Release build in Xcode, as the Debug symbols can easily double the size of the generated binary during testing.

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

Book Free Session