|
...
|
...
|
@@ -132,12 +132,8 @@ class TodayActivityCard extends StatelessWidget { |
|
|
|
// stand 单位为秒,转换为小时+分钟
|
|
|
|
List<_MetricValueSpan> standSpans;
|
|
|
|
if (stand > 0 && (activityTarget?.stand ?? 0) > 0) {
|
|
|
|
final stHours = stand ~/ 3600;
|
|
|
|
final stMinutes = (stand % 3600) ~/ 60;
|
|
|
|
standSpans = [
|
|
|
|
if (stHours > 0) _MetricValueSpan('$stHours', '小时'),
|
|
|
|
if (stMinutes > 0 || stHours == 0)
|
|
|
|
_MetricValueSpan(stMinutes > 0 ? '$stMinutes' : '0', '分钟'),
|
|
|
|
_MetricValueSpan('$stand', '小时'),
|
|
|
|
];
|
|
|
|
} else {
|
|
|
|
standSpans = [_MetricValueSpan('--', '小时')];
|
...
|
...
|
|