For many users in Ghana, every megabyte costs money and phone storage is nearly full. A large download may never start, and an app that stutters on a modest phone gets uninstalled. Performance was named in some of the adverts we read, and caring about them shows an employer you understand real users.
Measure first, and measure the right build
Never judge size or speed from a debug build; it carries development tools and is much bigger and slower. To see what users really get:
- Build an Android App Bundle with
flutter build appbundle. When you upload a bundle, Google Play creates smaller downloads tailored to each phone, instead of one large file for every device. - Add
--analyze-sizeto a build command to see a breakdown of what takes up space: your Dart code, packages, assets and native code. Flutter DevTools can open the analysis file as a visual map. - After uploading to Play Console, check its app size information for the real download size.
Shrinking the download
- Images are usually the biggest win. Compress PNG and JPEG files, use the size you actually display, and consider WebP. Remove unused assets.
- Be choosy with packages. Each package adds code. Before adding one, ask whether a few lines of your own would do.