• David Iglesias's avatar
    [web] Encode AssetManifest.bin as JSON and use that on the web. (#131382) · c7c9d8ee
    David Iglesias authored
    This PR modifies the web build slightly to create an `AssetManifest.json`, that is a JSON(base64)-encoded version of the `AssetManifest.bin` file.
    
    _(This should enable all browsers to download the file without any interference, and all servers to serve it with the correct headers.)_
    
    It also modifies Flutter's `AssetManifest` class so it loads and uses said file `if (kIsWeb)`.
    
    ### Issues
    
    * Fixes https://github.com/flutter/flutter/issues/124883
    
    ### Tests
    
    * Unit tests added.
    * Some tests that run on the Web needed to be informed of the new filename, but their behavior didn't have to change (binary contents are the same across all platforms).
    * I've deployed a test app, so users affected by the BIN issue may take a look at the PR in action:
      * https://dit-tests.web.app
    c7c9d8ee
image_resolution_test.dart 7.82 KB