I am learning flutter. I have few doubts.
For flutter app to run we do need a flutter engine, right?
But when I download a flutter app from Play Store(android) or App store(ios) when do the flutter engine gets installed into mobile ?
For a reference I have saw this https://github.com/flutter/flutter/issues/56863 , is this how it happens ?
2
Answers
The engine is compiled into the apk/app bundle. This leads to flutter apps always having an apk size of 15 MBs minimum. However, I don’t think this is a huge disadvantage. Of course, it’s nice when your app is small, but nowdays, there are very little phones that do not have enough storage. Plus, 15 MBs is not huge, there are games that go up to 5 GBs.
The issue you mentioned is a proposal but not reality, and the Flutter Team can’t do much for that becoming reality.
As from the official flutter docs website :
Also :
So on every app made with flutter, the Flutter engine files/code will be inside the app, which causes an extra memory space, so when you run your app, this engine needs to run first ( which is really first ), then it will a wrapper over your
Dart
code.In order to know more about Flutter architecture and what happens under the hood, I recommend taking a look over this:
https://docs.flutter.dev/resources/faq
https://docs.flutter.dev/resources/inside-flutter
https://docs.flutter.dev/resources/architectural-overview