Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove code that generates and reads AssetManifest.json #114913

Closed as not planned
Closed as not planned
@andrewkolos

Description

@andrewkolos

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 using AssetManifest.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 loading AssetManifest.json when resolving assets.

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projecta: assetsPackaging, accessing, or using assetsc: tech-debtTechnical debt, code quality, testing, etc.toolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions