Reputation: 569
As i searched in internet, an empty flutter build should be about 7.5 megabytes.
I build it in debug mode using command prompt windows flutter run its about 26 megabytes. Is there any settings or something else to make the final output optimized and less size?
Upvotes: 4
Views: 1289
Reputation: 11754
From here
Debug
- Compilation is optimized for fast development and run cycles (but not for execution speed, binary size, or deployment.)
Release
- Compilation is optimized for fast startup, fast execution, and small package sizes.
In debug mode, the APK size will be higher compared to release mode. Because, in order to increase the development speed and run cycles, they do debug processes in the APK itself.
But in release mode, you'll get small package size as they will remove development packages from the APK.
Upvotes: 1
Reputation: 3305
From the docs:
By default, flutter run
compiles to debug mode It means:
You should use flutter run --release
for deploying the app, when you want maximum optimization and minimal footprint size. It means:
Upvotes: 3