build: 移除 Web 平台支持
删掉 web/ 目录与 4 个 *_web.dart 实现(jsQR/dart:html 解码、FileUploadInputElement 选图、以及为 Web 空实现的缓存与导出)。剩下 Android/iOS/Windows/macOS/Linux。 顺带把只剩单一实现的「façade + _native + _web」条件导入结构收敛成单文件, 调用点不变。同时从 .metadata 的 migration 平台列表和 analysis_options 的 exclude 里去掉 web,避免 flutter create/migrate 再把 web/ 生成回来。 QR 从图片解码此前只有 Web 端用 jsQR 真正可用,移动端走 MethodChannel 由 MainActivity/SceneDelegate 实现,桌面端无 handler——这一点在 qr_service.dart 和 README 里都注明了。 副作用:dart:html / dart:js 带来的 5 条 analyze info 随文件消失, flutter analyze 从 7 条降到 1 条(剩下的是 title_api_service 里既有的 prefer_initializing_formals)。
This commit is contained in:
1 parent
b6d55bf236
commit
cb50426a61
22 files changed
+78
-285
No files matched your search
@@ -1,7 +1,7 @@
|
||||
# Ichino
|
||||
|
||||
基于 QR Code 登录的 *某游戏* 客户端,Flutter 实现,覆盖
|
||||
Android / iOS / Web / Windows / macOS / Linux。
|
||||
Android / iOS / Windows / macOS / Linux。
|
||||
|
||||
包名 `ichino`,应用标识 `dev.naominet.ichino`。
|
||||
|
||||
@@ -23,7 +23,6 @@ Android / iOS / Web / Windows / macOS / Linux。
|
||||
```bash
|
||||
flutter pub get
|
||||
flutter run # 默认设备
|
||||
flutter run -d chrome # Web
|
||||
flutter analyze # 需保持 0 error/warning
|
||||
flutter test
|
||||
```
|
||||
@@ -35,7 +34,6 @@ flutter build apk --release # Android
|
||||
flutter build windows --release # Windows(产物为 ichino.exe)
|
||||
flutter build macos --release # macOS
|
||||
flutter build linux --release # Linux
|
||||
flutter build web --release # Web
|
||||
flutter build ios --release --no-codesign # iOS(无证书时只验证可编译)
|
||||
```
|
||||
|
||||
@@ -51,9 +49,9 @@ lib/
|
||||
└── widgets/ # 可复用视觉组件(B50 海报)
|
||||
```
|
||||
|
||||
平台相关代码用条件导入分离,形如 `xxx_service.dart` + `xxx_service_native.dart`
|
||||
+ `xxx_service_web.dart`(见 `qr_service`、`file_picker_service`、
|
||||
`png_export_service`、`music_data_cache`)。
|
||||
平台差异只体现在原生侧:QR 解码由 Android 的 `MainActivity` 与 iOS 的
|
||||
`SceneDelegate` 通过 `dev.naominet.ichino/qr_scanner` 这个 MethodChannel 提供,
|
||||
桌面平台没有该 handler,因此从图片识别二维码仅在移动端可用。
|
||||
|
||||
## 关键实现说明
|
||||
|
||||
|
||||
Reference in new issue
Block a user