Commit 98c7d845d024562441ea123ea981846c5019e265

Authored by 常守达
1 parent da69a8df

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

@@ -1148,7 +1148,7 @@ class _StressBarChartState extends State<_StressBarChart> { @@ -1148,7 +1148,7 @@ class _StressBarChartState extends State<_StressBarChart> {
1148 // 手绘 100、50、0 标签在对应的横线上方 1148 // 手绘 100、50、0 标签在对应的横线上方
1149 Positioned( 1149 Positioned(
1150 right: -5, 1150 right: -5,
1151 - top: gridTop - 12, 1151 + top: gridTop - 16,
1152 child: Text( 1152 child: Text(
1153 '100', 1153 '100',
1154 style: 1154 style:
@@ -1156,7 +1156,7 @@ class _StressBarChartState extends State<_StressBarChart> { @@ -1156,7 +1156,7 @@ class _StressBarChartState extends State<_StressBarChart> {
1156 ), 1156 ),
1157 ), 1157 ),
1158 Positioned( 1158 Positioned(
1159 - right: -6, 1159 + right: -8,
1160 top: gridTop + gridHeight * 0.5 - 12, 1160 top: gridTop + gridHeight * 0.5 - 12,
1161 child: Text( 1161 child: Text(
1162 '50', 1162 '50',
@@ -1165,7 +1165,7 @@ class _StressBarChartState extends State<_StressBarChart> { @@ -1165,7 +1165,7 @@ class _StressBarChartState extends State<_StressBarChart> {
1165 ), 1165 ),
1166 ), 1166 ),
1167 Positioned( 1167 Positioned(
1168 - right: -1, 1168 + right: -4,
1169 top: gridBottom - 12, 1169 top: gridBottom - 12,
1170 child: Text( 1170 child: Text(
1171 '0', 1171 '0',
@@ -25,7 +25,8 @@ class TodaySleepCard extends StatelessWidget { @@ -25,7 +25,8 @@ class TodaySleepCard extends StatelessWidget {
25 int sleepMinutes = (sleepDuration % 3600) ~/ 60; 25 int sleepMinutes = (sleepDuration % 3600) ~/ 60;
26 Color sleepStateColor = sleepDuration == 0 26 Color sleepStateColor = sleepDuration == 0
27 ? context.colors.textPrimary 27 ? context.colors.textPrimary
28 - : healthData?.sleepStateColor(context); 28 + : healthData?.sleepStateColor(context) ??
  29 + context.colors.textPrimary;
29 String sleepStateStr = 30 String sleepStateStr =
30 sleepDuration == 0 ? '-' : healthData?.sleepStateStr() ?? '-'; 31 sleepDuration == 0 ? '-' : healthData?.sleepStateStr() ?? '-';
31 String sleepAverageHeartRate = 32 String sleepAverageHeartRate =