chore: v6.6.6 版本迭代更新
主要变更: 1. 重构"国学"相关模块为"经典名句",统一命名规范 2. 重命名"阅读报告"为"使用报告",调整相关文案与配置 3. 修复iOS模拟器图片缓存兼容问题,优化图表渲染逻辑 4. 新增设备活跃状态前端兜底判断,修复在线计数异常 5. 完善登录/注册流程,新增忘记密码路由与账户编辑提示 6. 优化文件传输与字体导入逻辑,废弃过时的bytes属性使用 7. 添加Spotlight全局快捷键支持,更新隐私权限与通知配置 8. 补充数据库迁移脚本与部署文档,修复后端接口兼容问题 9. 调整部分UI交互细节,优化内存占用与应用稳定性
This commit is contained in:
@@ -22,12 +22,13 @@ class ImageImportService {
|
||||
final result = await FilePicker.pickFiles(type: FileType.image);
|
||||
if (result == null || result.files.isEmpty) return null;
|
||||
final file = result.files.first;
|
||||
if (file.bytes != null) return file.bytes;
|
||||
// 优先通过路径读取,避免使用已废弃的 bytes 属性
|
||||
if (file.path != null) {
|
||||
final f = File(file.path!);
|
||||
return await f.readAsBytes();
|
||||
}
|
||||
return null;
|
||||
// 路径不可用时回退到 readAsBytes
|
||||
return await file.readAsBytes();
|
||||
} catch (e) {
|
||||
Log.e('图片导入失败', e);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user