Commit 98c7d845d024562441ea123ea981846c5019e265

Authored by 常守达
1 parent da69a8df

fix(today):实时压力x轴末尾展示

... ... @@ -1148,7 +1148,7 @@ class _StressBarChartState extends State<_StressBarChart> {
// 手绘 100、50、0 标签在对应的横线上方
Positioned(
right: -5,
top: gridTop - 12,
top: gridTop - 16,
child: Text(
'100',
style:
... ... @@ -1156,7 +1156,7 @@ class _StressBarChartState extends State<_StressBarChart> {
),
),
Positioned(
right: -6,
right: -8,
top: gridTop + gridHeight * 0.5 - 12,
child: Text(
'50',
... ... @@ -1165,7 +1165,7 @@ class _StressBarChartState extends State<_StressBarChart> {
),
),
Positioned(
right: -1,
right: -4,
top: gridBottom - 12,
child: Text(
'0',
... ...
... ... @@ -25,7 +25,8 @@ class TodaySleepCard extends StatelessWidget {
int sleepMinutes = (sleepDuration % 3600) ~/ 60;
Color sleepStateColor = sleepDuration == 0
? context.colors.textPrimary
: healthData?.sleepStateColor(context);
: healthData?.sleepStateColor(context) ??
context.colors.textPrimary;
String sleepStateStr =
sleepDuration == 0 ? '-' : healthData?.sleepStateStr() ?? '-';
String sleepAverageHeartRate =
... ...