@@ -82,13 +82,8 @@ passing a configuration object to the loader, as follows:
82
82
a new object to the ` _flutter.loader.load ` method that is
83
83
provided by the earlier injected code.
84
84
85
- 将你准备好的 config 对象作为新对象的 ` config ` 属性,
86
- 传递给先前注入的代码所提供的 ` _flutter.loader.load ` 方法。
87
-
88
85
Example:
89
86
90
- 示例:
91
-
92
87
``` html highlightLines=9-14
93
88
<body >
94
89
<script >
@@ -112,19 +107,10 @@ The web renderer can't be changed after calling the `load` method. Therefore,
112
107
any decisions about which renderer to use, must be made prior to calling
113
108
` _flutter.loader.load ` .
114
109
115
- Web 渲染器在调用 ` load ` 方法后就无法改变了。
116
- 因此,必须在调用 ` _flutter.loader.load ` 之前决定使用哪种渲染器。
117
-
118
110
::: version-note
119
-
120
111
The method of specifying the web renderer was changed in Flutter 3.22.
121
112
To learn how to configure the renderer in earlier Flutter versions,
122
113
check out [ Legacy web app initialization] [ web-init-legacy ] .
123
-
124
- 在 Flutter 3.22 中更改了指定 Web 渲染器的方法。
125
- 要了解如何在 Flutter 早期版本中配置渲染器,
126
- 请查阅 [ 早期的 Web 应用初始化] [ web-init-legacy ]
127
-
128
114
:::
129
115
130
116
[ custom-bootstrap ] : /platform-integration/web/initialization#custom-bootstrap-js
@@ -133,8 +119,6 @@ check out [Legacy web app initialization][web-init-legacy].
133
119
134
120
## Choosing which build mode to use
135
121
136
- ## 选择合适的渲染器
137
-
138
122
Compiling Dart to WebAssembly comes with a few new requirements that must be met
139
123
by all app code, and all plugins and packages used by the app:
140
124
@@ -160,36 +144,26 @@ General recommendations can be summarized as follows:
160
144
161
145
## Examples
162
146
163
- ## 示例
164
-
165
147
Run in Chrome using the default build mode:
166
148
167
- 在 Chrome 浏览器上使用默认构建模式运行:
168
-
169
149
``` console
170
150
flutter run -d chrome
171
151
```
172
152
173
153
Build your app for release using the default build mode:
174
154
175
- 使用默认构建模式来构建应用,以便进行发布:
176
-
177
155
``` console
178
156
flutter build web
179
157
```
180
158
181
159
Build your app for release using the WebAssembly mode:
182
160
183
- 使用 WebAssembly 模式构建应用,以便进行发布:
184
-
185
161
``` console
186
162
flutter build web --wasm
187
163
```
188
164
189
165
Run your app for profiling using the default build mode:
190
166
191
- 使用默认构建模式运行应用,以便进行性能分析:
192
-
193
167
``` console
194
168
flutter run -d chrome --profile
195
169
```
0 commit comments