Files
Flutter_Shell/README.md
Booker 15d767100a Refactor widget tests for H5 line generation and validation
- Simplified tests for H5 line creation, focusing on single line generation with a numeric 16-digit label.
- Updated assertions to validate the generated H5 line's label and URI structure.
- Removed redundant tests related to default H5 line URLs and local access, consolidating functionality into fewer tests.
- Added new tests to ensure correct URL generation from configured fallback order and query parameter handling.
- Enhanced test coverage for restoring cached H5 line URLs and validating their structure.
2026-06-06 03:48:20 +07:00

1.3 KiB
Raw Permalink Blame History

im_webview_app

Flutter WebView 套壳 App。启动时只会生成并加载一个 H5 URL如果当前 URL 探测或加载失败,壳层会重新生成下一个 URL 并替换当前 WebView项目运行过程中始终只持有一个 H5 URL。

默认 URL 来自代码中的泛域名模板,会生成 16 位数字子域名,并通过查询参数把 Flutter 壳请求地址传给 H5

https://1234567890123456.albzyuxq.vip/?flutter_shell=1&flutter_shell_url=https%3A%2F%2F1234567890123456.albzyuxq.vip

本地打包

flutter build apk --release

APK 产物:

build/app/outputs/flutter-apk/app-release.apk

自动部署 APK

app 目录执行:

./deploy-app.sh

这个命令会自动执行:

flutter build apk --release
scp -P 22 ./build/app/outputs/flutter-apk/app-release.apk root@54.116.29.247:/data/wwwroot/apk/
ssh -p 22 root@54.116.29.247 "bash /data/wwwroot/apk/show_apk_link.sh app-release.apk"

如果已经打包好了,只想上传现有 APK

./deploy-app.sh --skip-build

如果要上传自定义 APK

./deploy-app.sh --skip-build --apk ./build/app/outputs/flutter-apk/app-release.apk

远端配置也可以通过参数覆盖:

./deploy-app.sh --host 54.116.29.247 --user root --port 22