-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Flutter allows you to customize the location that assets will be loaded from by adding a tag like:
<meta name="assetBase" content="path/to/my/flutter/assets">
See the logic here: https://github.com/flutter/engine/blob/170cbea98cefa9e3a59e58286a68028b35b3635d/lib/web_ui/lib/src/engine/assets.dart#L45
If this tag isn't supplied, assets are loaded relative to the regular base URL.
I haven't actually found documentation for this anywhere.
I think configuration of the assetBase would be better moved to a parameter of the loadEntrypoint method as part of the flutter.js initialization process (see https://docs.flutter.dev/development/platform-integration/web/initialization). This would make it much easier for Google apps to figure out how to initialize Flutter properly. We rely on this, so the change would have to be non-breaking e.g. by using the loadEntrypoint value, else the meta tag value, else empty string.