You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/content/platform-integration/web/initialization.md
+17-2
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ substitute in either the `flutter_bootstrap.js` or `index.html` files:
73
73
|---|---|
74
74
|`{% raw %}{{flutter_js}}{% endraw %}`| The JavaScript code that makes the `FlutterLoader` object available in the `_flutter.loader` global variable. (See the `_flutter.loader.load() API` section below for more details.) |
75
75
|`{% raw %}{{flutter_build_config}}{% endraw %}`| A JavaScript statement that sets metadata produced by the build process which gives the `FlutterLoader` information needed to properly bootstrap your application. |
76
-
|`{% raw %}{{flutter_service_worker_version}}{% endraw %}`| A unique number representing the build version of the service worker, which can be passed as part of the service worker configuration (see the "Service Worker Settings" table below). |
76
+
|`{% raw %}{{flutter_service_worker_version}}{% endraw %}`| A unique number representing the build version of the service worker, which can be passed as part of the service worker configuration (see the "Common warning" info below). |
77
77
|`{% raw %}{{flutter_bootstrap_js}}{% endraw %}`| As mentioned above, this inlines the contents of the `flutter_bootstrap.js` file directly into the `index.html` file. Note that this token can only be used in the `index.html` and not the `flutter_bootstrap.js` file itself. |
78
78
79
79
{:.table}
@@ -101,7 +101,7 @@ The most basic `flutter_bootstrap.js` file would look something like this:
101
101
_flutter.loader.load();
102
102
```
103
103
104
-
## Customize the Flutter Loader
104
+
## Customize the Flutter loader
105
105
106
106
The `_flutter.loader.load()` JavaScript API can be invoked with optional
107
107
arguments to customize initialization behavior:
@@ -210,3 +210,18 @@ _flutter.loader.load({
210
210
}
211
211
});
212
212
```
213
+
214
+
## Common warning
215
+
216
+
If you experience a warning similar to the following:
217
+
218
+
```text
219
+
Warning: In index.html:37: Local variable for "serviceWorkerVersion" is deprecated.
220
+
Use "{{flutter_service_worker_version}}" template token instead.
221
+
```
222
+
223
+
You can fix this by deleting the following line in the `web/index.html` file:
0 commit comments