fix:修复首次编辑会清空数值的问题

This commit is contained in:
2025-12-10 09:26:41 +08:00
parent 190963f079
commit 2b334edf2f
2 changed files with 3 additions and 5 deletions

View File

@@ -29,7 +29,9 @@ class _GoalProgressState extends State<GoalProgress> {
provider.avgSleep = service.getAvgSleep();
provider.latestWeight = service.getLatestWeight();
provider.updateRecord(service.getRecordByDate(provider.selectedDate));
HealthRecord record = service.getRecordByDate(provider.selectedDate);
provider.updateRecord(record);
provider.initForm(record);
});
}