feat: 添加 H5 线路切换功能;支持动态加载和切换不同线路的 URL
This commit is contained in:
16
README.md
16
README.md
@@ -6,6 +6,22 @@ Flutter WebView 套壳 App,默认加载:
|
||||
https://h5-test.imharry.work/
|
||||
```
|
||||
|
||||
## H5 线路切换
|
||||
|
||||
线路切换在 Flutter 套壳层完成,H5 页面不需要承载线路切换逻辑。每条线路都是一个独立 H5 地址,切换时 WebView 会直接加载被选中的地址。
|
||||
|
||||
默认线路配置在:
|
||||
|
||||
```text
|
||||
openim_common/lib/src/config.dart
|
||||
```
|
||||
|
||||
也可以在打包时覆盖:
|
||||
|
||||
```bash
|
||||
flutter build apk --release --dart-define=H5_LINE_URLS=https://h5-one.example/,https://h5-two.example/
|
||||
```
|
||||
|
||||
## 本地打包
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user