release 1.31

This commit is contained in:
Developer
2026-04-22 10:09:18 +08:00
parent 32f5aa53fa
commit ac62f5961e
212 changed files with 30003 additions and 1350 deletions

View File

@@ -1,6 +1,6 @@
# 鸿蒙适配方案
> 文档创建: 2026-04-09 | 最后更新: 2026-04-14
> 文档创建: 2026-04-09 | 最后更新: 2026-04-22
> 适配策略: 纯 Dart 包零成本适配 + 原生插件完整适配
---
@@ -156,6 +156,7 @@ flutter pub get && flutter analyze --no-pub
| 6 | flutter_card_swiper | 7.2.0 | 7.2.0-ohos.1 | 2026-04-14 | ✅ analyze 通过 |
| 7 | qr | 3.0.2 | 3.0.2-ohos.1 | 2026-04-19 | ✅ pub get 通过 |
| 8 | mailer | 7.1.0 | 7.1.0-ohos.1 | 2026-04-19 | ✅ pub get 通过 |
| 9 | mobile_scanner | 7.2.0 | 7.2.0+ohos | 2026-04-22 | ✅ 原生插件含鸿蒙ets实现 |
### 5.2 各包克隆命令速查
@@ -186,6 +187,10 @@ git clone --depth 1 --branch v3.0.2 https://github.com/kevmoo/qr.dart.git qr
# 8. mailer
git clone --depth 1 --branch v7.1.0 https://github.com/dart-mailer/mailer.git mailer
# 9. mobile_scanner官方v7.2.0 + 鸿蒙适配合并)
git clone --depth 1 --branch v7.2.0 https://github.com/juliansteenbakker/mobile_scanner.git mobile_scanner
# 合并鸿蒙适配ohos/ 目录、ohos_surface_producer_delegate.dart、surface_producer_delegate.dart、rotated_preview.dart 鸿蒙旋转修复
```
### 5.3 各包使用示例
@@ -242,6 +247,17 @@ final message = Message()..from = Address('user@gmail.com')..recipients.add('tar
final sendReport = await send(message, smtpServer);
```
**mobile_scanner**
```dart
import 'package:mobile_scanner/mobile_scanner.dart';
MobileScanner(
controller: MobileScannerController(),
onDetect: (result) {
print(result.barcodes.first.rawValue);
},
)
```
---
## 六、项目依赖兼容性总览
@@ -256,6 +272,7 @@ final sendReport = await send(message, smtpServer);
| flutter_card_swiper | 本地 path | ✅ | ✅ | 纯 Dart |
| qr | 本地 path | ✅ | ✅ | 纯 DartQR码生成 |
| mailer | 本地 path | ❌ | ✅ | 纯 DartSMTP客户端Web不支持 |
| mobile_scanner | 本地 path | ✅ | ✅ | 原生插件,扫码/二维码v7.2.0+鸿蒙适配 |
| hive_ce | pub.dev | ✅ | ✅ | 纯 Dart |
| get / dio / logger / intl | pub.dev | ✅ | ✅ | 纯 Dart |
| shared_preferences | pub.dev | ✅ | ✅ | localStorage |