Commit 4515982819265640bea613eb87db225b02a9815e

Authored by 常守达
1 parent e969282f

fix(today):睡眠卡片默认8小时目标

@@ -33,11 +33,11 @@ class TodaySleepCard extends StatelessWidget { @@ -33,11 +33,11 @@ class TodaySleepCard extends StatelessWidget {
33 ? '-' 33 ? '-'
34 : '${healthData?.hrAvg}'; 34 : '${healthData?.hrAvg}';
35 double sleepDurationProgress = 35 double sleepDurationProgress =
36 - (activityTarget?.sleepTargetDuration ?? 0) == 0 || 36 + (activityTarget?.sleepTargetDuration ?? 28800) == 0 ||
37 sleepDuration == 0 37 sleepDuration == 0
38 ? -1 38 ? -1
39 : ((healthData?.sleepDuration ?? 0) / 39 : ((healthData?.sleepDuration ?? 0) /
40 - (activityTarget?.sleepTargetDuration ?? 0) * 40 + (activityTarget?.sleepTargetDuration ?? 28800) *
41 360); 41 360);
42 double sleepScoreProgress = 42 double sleepScoreProgress =
43 sleepDuration == 0 ? -1 : (healthData?.sleepScore ?? 0.0) * 3.6; 43 sleepDuration == 0 ? -1 : (healthData?.sleepScore ?? 0.0) * 3.6;