Remove code that generates and reads AssetManifest.json #114913
Labels
a: assets
Packaging, accessing, or using assets
c: tech-debt
Technical debt, code quality, testing, etc.
P3
Issues that are less important to the Flutter project
tool
Affects the "flutter" command-line tool. See also t: labels.
Uh oh!
There was an error while loading. Please reload this page.
AssetManifest.json
is an asset that is generated by the tool during build that lists available assets and their variants. When loading an image at runtime, the framework reads and parses this file to determine if an asset is available#113637 aims to replace this file with a new one named
AssetManifest.bin
, which contains similar data that is encoded using the standard_message_codec package. This change speeds up parsing the manifest at runtime, resulting in faster first asset load--especially for apps with large amounts of assets.While
AssetManifest.json
is not officially documented, some users do depend on this file, and removing it outright would break them. For example, Google Fonts reads it to determine whether or not a font can be loaded from the device rather than loading it over HTTP.As such, the aforementioned PR (#113637) will temporarily leave the generation of
AssetManifest.json
unchanged, and this should be later removed as a part of a breaking change. On the framework side, Flutter will start usingAssetManifest.bin
immediately, but in the event that it can't be loaded for whatever reason (e.g. custom tooling within g3 doesn't yet generate the file), the framework will fallback to loadingAssetManifest.json
when resolving assets.The text was updated successfully, but these errors were encountered: