refactor: 重构蓝牙设备页与新增设备页的扫描-连接-录入流程
- 通用 BLE 健康设备识别(血压计/血糖仪/体重秤/血氧仪 标准 service UUID) - 蓝牙设备页静默自动同步:仅匹配已绑定的设备名+类型,收到数据后变绿 - 新增设备页:扫描所有支持类型设备 → 选连接 → 绑定 + 同步首次数据 - 修复 read 缓存导致的重复录入循环(删除主动 read,依赖 indicate 推送) - 修复 isConnected 缓存状态导致连接异常(强制先 disconnect 再 connect) - 录入弹窗:血压心率同等级展示、3 秒自动关闭/手动确认 - 顺手更新本机开发 IP 与清理过时设计文档
This commit is contained in:
@@ -78,7 +78,9 @@ class _TrendPageState extends ConsumerState<TrendPage> {
|
||||
'id': r['id'],
|
||||
'type': t,
|
||||
'date':
|
||||
DateTime.tryParse(r['recordedAt']?.toString() ?? '') ??
|
||||
DateTime.tryParse(
|
||||
r['recordedAt']?.toString() ?? '',
|
||||
)?.toLocal() ??
|
||||
DateTime.now(),
|
||||
'systolic': r['systolic'],
|
||||
'diastolic': r['diastolic'],
|
||||
|
||||
Reference in New Issue
Block a user