更新日历样式
This commit is contained in:
@@ -23,7 +23,7 @@ Widget MonthDataWidget(
|
||||
), //睡眠评分
|
||||
SleepChartContainer(
|
||||
title: "每日得分",
|
||||
tipText: "每日得分介绍",
|
||||
tipText: "用户本月睡眠分数的汇总。",
|
||||
sleepReport: sleepReport,
|
||||
chartContent: LineView(
|
||||
xLabels: [
|
||||
@@ -94,7 +94,7 @@ Widget MonthDataWidget(
|
||||
IndicatorCompareCard(
|
||||
title: "与上月对比",
|
||||
headers: ["名称", "上月", "本月", "参考范围"],
|
||||
tooltip: "与上月对比提示",
|
||||
tooltip: "睡眠分数与上月分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。",
|
||||
rows: (sleepReport['cwl'] ?? []).map<List<Widget>>((item) {
|
||||
return [
|
||||
Text(
|
||||
@@ -121,7 +121,7 @@ Widget MonthDataWidget(
|
||||
),
|
||||
SleepChartContainer(
|
||||
title: "本月睡眠时长",
|
||||
tipText: "每日得分介绍",
|
||||
tipText: "本月睡眠时长是指从月初到月末,用户每天实际睡眠的时间总和。",
|
||||
sleepReport: sleepReport,
|
||||
chartContent: LineView(
|
||||
xLabels: [
|
||||
@@ -187,7 +187,7 @@ Widget MonthDataWidget(
|
||||
|
||||
TrendDataTablePage(
|
||||
title: sleepReport['dysp'][0]['name'],
|
||||
tipText: "入睡时间趋势提示",
|
||||
tipText: sleepReport['dysp'][0]['tips'],
|
||||
chartContent: LineView(
|
||||
xLabels: [
|
||||
ChartLables(
|
||||
@@ -253,7 +253,7 @@ Widget MonthDataWidget(
|
||||
padding: 45.rpx),
|
||||
TrendDataTablePage(
|
||||
title: sleepReport['dysp'][1]['name'],
|
||||
tipText: "起床时间趋势提示",
|
||||
tipText: sleepReport['dysp'][1]['tips'],
|
||||
chartContent: LineView(
|
||||
xLabels: [
|
||||
ChartLables(
|
||||
@@ -319,7 +319,7 @@ Widget MonthDataWidget(
|
||||
padding: 45.rpx),
|
||||
TrendDataTablePage(
|
||||
title: sleepReport['dysp'][2]['name'],
|
||||
tipText: "心率基准趋势提示",
|
||||
tipText: sleepReport['dysp'][2]['tips'],
|
||||
chartContent: LineView(
|
||||
xLabels: [
|
||||
ChartLables(
|
||||
@@ -385,7 +385,7 @@ Widget MonthDataWidget(
|
||||
padding: 45.rpx),
|
||||
TrendDataTablePage(
|
||||
title: sleepReport['dysp'][3]['name'],
|
||||
tipText: "心率变异性趋势提示",
|
||||
tipText: sleepReport['dysp'][3]['tips'],
|
||||
chartContent: LineView(
|
||||
xLabels: [
|
||||
ChartLables(
|
||||
@@ -451,7 +451,7 @@ Widget MonthDataWidget(
|
||||
padding: 45.rpx),
|
||||
TrendDataTablePage(
|
||||
title: sleepReport['dysp'][4]['name'],
|
||||
tipText: "呼吸基准趋势提示",
|
||||
tipText: sleepReport['dysp'][4]['tips'],
|
||||
chartContent: LineView(
|
||||
xLabels: [
|
||||
ChartLables(
|
||||
@@ -579,7 +579,8 @@ List<String> buildSleepValueTexts(
|
||||
String dateStr = '';
|
||||
if (item['st'] != null) {
|
||||
final dt = DateTime.fromMillisecondsSinceEpoch(item['st']);
|
||||
dateStr = "${dt.year}年${dt.month.toString().padLeft(2, '0')}月${dt.day.toString().padLeft(2, '0')}日";
|
||||
dateStr =
|
||||
"${dt.year}年${dt.month.toString().padLeft(2, '0')}月${dt.day.toString().padLeft(2, '0')}日";
|
||||
}
|
||||
|
||||
var q = [
|
||||
@@ -623,9 +624,9 @@ Map<String, dynamic> buildMonthlyChartData(Map<String, dynamic> dyspData) {
|
||||
|
||||
// 获取当前月的总天数(以第一条数据为准)
|
||||
DateTime baseDate = DateTime.fromMillisecondsSinceEpoch(data.first['st']);
|
||||
double daysInMonth = DateTime(baseDate.year, baseDate.month + 1, 0)
|
||||
.day
|
||||
.toDouble()-1; // 👈 改为 double
|
||||
double daysInMonth =
|
||||
DateTime(baseDate.year, baseDate.month + 1, 0).day.toDouble() -
|
||||
1; // 👈 改为 double
|
||||
|
||||
List<Offset> points = [];
|
||||
List<String> colors = [];
|
||||
|
||||
@@ -23,7 +23,7 @@ Widget WeekDataWidget(
|
||||
), //睡眠评分
|
||||
SleepChartContainer(
|
||||
title: "每日得分",
|
||||
tipText: "睡眠规律性介绍",
|
||||
tipText: "用户本周睡眠分数的汇总。",
|
||||
sleepReport: sleepReport,
|
||||
chartContent: LineView(
|
||||
xLabels: [
|
||||
@@ -108,7 +108,7 @@ Widget WeekDataWidget(
|
||||
IndicatorCompareCard(
|
||||
title: "与上周对比",
|
||||
headers: ["名称", "上周", "本周", "参考范围"],
|
||||
tooltip: "与上周对比提示",
|
||||
tooltip: "睡眠分数与上周分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。",
|
||||
rows: (sleepReport['cwl'] ?? []).map<List<Widget>>((item) {
|
||||
return [
|
||||
Text(
|
||||
@@ -135,7 +135,7 @@ Widget WeekDataWidget(
|
||||
),
|
||||
SleepChartContainer(
|
||||
title: "本周睡眠时长",
|
||||
tipText: "本周睡眠时长介绍",
|
||||
tipText: "本周睡眠时长是指从周一到周日内,每天实际睡眠的时间总和。",
|
||||
sleepReport: sleepReport,
|
||||
chartContent: LineView(
|
||||
xLabels: [
|
||||
@@ -212,7 +212,7 @@ Widget WeekDataWidget(
|
||||
),
|
||||
TrendDataTablePage(
|
||||
title: sleepReport['dysp'][0]['name'],
|
||||
tipText: "入睡时间趋势提示",
|
||||
tipText: sleepReport['dysp'][0]['tips'],
|
||||
chartContent: LineView(
|
||||
xLabels: [
|
||||
ChartLables(
|
||||
@@ -290,7 +290,7 @@ Widget WeekDataWidget(
|
||||
padding: 45.rpx),
|
||||
TrendDataTablePage(
|
||||
title: sleepReport['dysp'][1]['name'],
|
||||
tipText: "起床时间趋势提示",
|
||||
tipText: sleepReport['dysp'][1]['tips'],
|
||||
chartContent: LineView(
|
||||
xLabels: [
|
||||
ChartLables(
|
||||
@@ -368,7 +368,7 @@ Widget WeekDataWidget(
|
||||
padding: 45.rpx),
|
||||
TrendDataTablePage(
|
||||
title: sleepReport['dysp'][2]['name'],
|
||||
tipText: "心率基准趋势提示",
|
||||
tipText:sleepReport['dysp'][2]['tips'],
|
||||
chartContent: LineView(
|
||||
xLabels: [
|
||||
ChartLables(
|
||||
@@ -446,7 +446,7 @@ Widget WeekDataWidget(
|
||||
padding: 45.rpx),
|
||||
TrendDataTablePage(
|
||||
title: sleepReport['dysp'][3]['name'],
|
||||
tipText: "心率变异性趋势提示",
|
||||
tipText: sleepReport['dysp'][3]['tips'],
|
||||
chartContent: LineView(
|
||||
xLabels: [
|
||||
ChartLables(
|
||||
@@ -524,7 +524,7 @@ Widget WeekDataWidget(
|
||||
padding: 45.rpx),
|
||||
TrendDataTablePage(
|
||||
title: sleepReport['dysp'][4]['name'],
|
||||
tipText: "呼吸基准趋势提示",
|
||||
tipText: sleepReport['dysp'][4]['tips'],
|
||||
chartContent: LineView(
|
||||
xLabels: [
|
||||
ChartLables(
|
||||
|
||||
Reference in New Issue
Block a user