Sushant Somani
Sushant Somani

Reputation: 1500

App space built using Flutter/Dart

I have created an android app using flutter/dart which has an app bar and a "Hellow world" string at the centre of the activity. When I checked the settings of the app, it shows that this app occupies some 44Mb of the phone space.

The same app built using XML/Java occupies mere 2-3 Mb. Why is there such a significant increase in space occupied by flutter/dart? Can I reduce it anyhow?

Upvotes: 0

Views: 250

Answers (1)

Günter Zöchbauer
Günter Zöchbauer

Reputation: 657446

For one, Flutter apps ship with the whole runtime. There is no dependency to a specific Android SDK (if you don't use plugins) which amounts to about 7MB for simple applications.

The main issue here is that you are using a debug build, which ships the Dart VM and debug information and whatnot.

Create a release build and the size will go down to about 7MB

flutter build apk --release

Upvotes: 2

Related Questions