|
...
|
...
|
@@ -33,11 +33,11 @@ class TodaySleepCard extends StatelessWidget { |
|
|
|
? '-'
|
|
|
|
: '${healthData?.hrAvg}';
|
|
|
|
double sleepDurationProgress =
|
|
|
|
(activityTarget?.sleepTargetDuration ?? 0) == 0 ||
|
|
|
|
(activityTarget?.sleepTargetDuration ?? 28800) == 0 ||
|
|
|
|
sleepDuration == 0
|
|
|
|
? -1
|
|
|
|
: ((healthData?.sleepDuration ?? 0) /
|
|
|
|
(activityTarget?.sleepTargetDuration ?? 0) *
|
|
|
|
(activityTarget?.sleepTargetDuration ?? 28800) *
|
|
|
|
360);
|
|
|
|
double sleepScoreProgress =
|
|
|
|
sleepDuration == 0 ? -1 : (healthData?.sleepScore ?? 0.0) * 3.6;
|
...
|
...
|
|