feat: 血压计联动心率记录 + 侧边栏左滑手势
- 血压计测量含脉搏时自动同步为 HeartRate 记录 - 首页 Scaffold 增加左侧滑手势打开侧边栏
This commit is contained in:
@@ -151,9 +151,12 @@ class _DeviceScanPageState extends ConsumerState<DeviceScanPage>
|
||||
_pulse = reading.pulse;
|
||||
});
|
||||
try {
|
||||
await ref
|
||||
.read(apiClientProvider)
|
||||
.post('/api/health-records', data: reading.toHealthRecord());
|
||||
final api = ref.read(apiClientProvider);
|
||||
await api.post('/api/health-records', data: reading.toHealthRecord());
|
||||
final heartRateRecord = reading.toHeartRateRecord();
|
||||
if (heartRateRecord != null) {
|
||||
await api.post('/api/health-records', data: heartRateRecord);
|
||||
}
|
||||
await ref.read(omronDeviceProvider.notifier).onReading(reading);
|
||||
} catch (e) {
|
||||
debugPrint('[PAGE] 上报失败: $e');
|
||||
|
||||
@@ -101,6 +101,7 @@ class _HomePageState extends ConsumerState<HomePage> {
|
||||
|
||||
return Scaffold(
|
||||
drawer: const HealthDrawer(),
|
||||
drawerEdgeDragWidth: MediaQuery.of(context).size.width * 0.35,
|
||||
body: AppBackground(
|
||||
safeArea: true,
|
||||
child: Column(
|
||||
|
||||
Reference in New Issue
Block a user