Comments

If you're creating an app that has native and flutter components there is no way to share images or fonts between flutter and android/ios. This means that assets needed on both sides will have to be included in the binary twice and that could be expensive.

There a suites of tools for packing, optimizing, and so forth an app's final bundle that gets distributed through app stores, and they all assume a certain layout of assets. Our current layout, harking from the days of FLX, doesn't play nicely with these tools. But now that we've gotten ourselves away from FLX, we should have more flexibility here.

e.g. for Android, they're moving towards a model where you don't upload an APK to the Play Store, but rather upload all the constituent parts of your APK, and when a user installs an app, the store cleverly constructs the thinnest APK it can ship to the user, containing only the assets that make sense for that user's device-pixel-ratio, locale, etc.

Just making sure that that end goal lines up with what this issue is tracking.

This comment has been minimized.

With the recent engine changes flutter/engine#4817 and flutter/engine#4785, it is now possible to share assets with native by accessing the Flutter assets through the main bundle on iOS and the AssetManager on Android. Once I document that on our website I will close this issue which is about avoiding asset duplication across platforms.

As a next step it would be great to align even more with the underlying platform, I created #16015 to track this.