Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Document how to share assets between Dart and OEM-side code #11019
I believe this came up again, in this Stack Overflow question: https://stackoverflow.com/questions/45428388/how-to-display-an-html-asset-file?utm_source=dlvr.it&utm_medium=twitter
(there may be different solutions to the problem, but it might be easier if the .html file bundled with the app wasn't stuck inside the FLX?)
@tvolkert https://github.com/flutter/flutter/issues/11019....am getting confused now about this asset issues all over...
@szakarias with the asset re-work, we should be moving towards the goal of storing our assets in the locations that the underlying platform would otherwise store them. e.g. for Android,
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.
referenced this issue
Mar 28, 2018
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.