Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -77,7 +77,8 @@ class _AIAdviceWidgetState extends State<AIAdviceWidget> {
|
|||||||
context,
|
context,
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
"AI分析介绍".tr,
|
// "AI分析介绍".tr,
|
||||||
|
"AI分析是指利用人工智能技术对用户的睡眠数据进行自动化处理与规律提取,对用户的异常睡眠数据给到一定的辅助决策或者解决问题。".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
|
|||||||
@@ -97,7 +97,8 @@ class _SnoreViewWidgetWidgetState extends State<BreathePauseNewWidget> {
|
|||||||
context,
|
context,
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
"呼吸暂停监测介绍。",
|
// "呼吸暂停监测介绍。",
|
||||||
|
"呼吸暂停监测是指用户在睡眠过程中产生的呼吸暂停的图表说明。",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
|
|||||||
@@ -129,7 +129,8 @@ class _BreatheStandardWidgetState extends State<BreatheStandardWidget> {
|
|||||||
context,
|
context,
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
"呼吸数据介绍".tr,
|
// "呼吸数据介绍".tr,
|
||||||
|
"呼吸数据是指用户在睡眠过程中呼吸的基本数据,是评估睡眠呼吸质量、筛查睡眠呼吸障碍的核心指标。".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
|
|||||||
@@ -86,7 +86,8 @@ class _CompareSleepWidgetState extends State<CompareSleepWidget> {
|
|||||||
context,
|
context,
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
"与昨日对比分析介绍".tr,
|
// "与昨日对比分析介绍".tr,
|
||||||
|
"基于时间维度的横向比较分析方法,通过将当前(今日)的数据、状态、行为等与前一日(昨日)的同类信息进行对照,识别差异、趋势或变化规律,查看用户短期时间序列的动态变化。".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
|
|||||||
@@ -78,7 +78,8 @@ class _DiseasePercentsWidgetState extends State<DiseasePercentsWidget> {
|
|||||||
context,
|
context,
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
"慢性病风险指数介绍".tr,
|
// "慢性病风险指数介绍".tr,
|
||||||
|
"慢性病风险指数是通过整合个体的生理指标、生活方式等多维度数据,构建的量化评估模型,用于预测用户未来患慢性非传染性疾病(如高血压、糖尿病、冠心病、癌症等)的风险概率。".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
|
|||||||
@@ -79,7 +79,8 @@ class _HeartChangeWidgetState extends State<HeartChangeWidget> {
|
|||||||
context,
|
context,
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
"心率变异性(HRV)介绍".tr,
|
// "心率变异性(HRV)介绍".tr,
|
||||||
|
"心率变异性(HRV)是指心脏每次跳动间隔时间的差异程度,反映自主神经系统(交感神经和副交感神经)对心脏的调节能力,是评估心血管健康和压力状态的重要指标。".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
|
|||||||
@@ -79,7 +79,8 @@ class _HeartHealthWidgetState extends State<HeartHealthWidget> {
|
|||||||
context,
|
context,
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
"心理健康评估介绍".tr,
|
// "心理健康评估介绍".tr,
|
||||||
|
"心率健康评估主要通过用户睡眠报告中的时间点、体征数据及HRV数据等信息,来判断其心理健康水平、疲劳程度。".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
|
|||||||
@@ -96,7 +96,8 @@ class _HeartPointWidgetState extends State<HeartPointWidget> {
|
|||||||
context,
|
context,
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
"心率散点图介绍".tr,
|
// "心率散点图介绍".tr,
|
||||||
|
"心电散点图是用非线性的图形方法描记的连续心冲击图的RR间期图,因图形由散点组成,又称散点图。".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
|
|||||||
@@ -128,7 +128,8 @@ class _HeartRateStandardWidgetState extends State<HeartRateStandardWidget> {
|
|||||||
context,
|
context,
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
"心率数据介绍".tr,
|
// "心率数据介绍".tr,
|
||||||
|
"心率数据是指用户在睡眠过程中基本心率数据,可初步判断睡眠中的心血管负荷及自主神经功能状态,为睡眠健康评估提供重要依据。".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
|
|||||||
@@ -37,108 +37,110 @@ class _SkinPercentWidgetState extends State<SkinPercentWidget> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
try {
|
try {
|
||||||
if (widget.sleepReport == null ||
|
if (widget.sleepReport == null ||
|
||||||
widget.sleepReport['sicp'] == null ||
|
widget.sleepReport['sicp'] == null ||
|
||||||
widget.sleepReport['sicp'].isEmpty) {
|
widget.sleepReport['sicp'].isEmpty) {
|
||||||
return Container();
|
return Container();
|
||||||
}
|
}
|
||||||
int id = 100001;
|
int id = 100001;
|
||||||
List data = widget.sleepReport['sicp'];
|
List data = widget.sleepReport['sicp'];
|
||||||
final target = data.firstWhere(
|
final target = data.firstWhere(
|
||||||
(element) => element['id'] == id,
|
(element) => element['id'] == id,
|
||||||
orElse: () => null, // 如果没有找到,返回 null(你也可以抛异常或用 {} 替代)
|
orElse: () => null, // 如果没有找到,返回 null(你也可以抛异常或用 {} 替代)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
return Container();
|
return Container();
|
||||||
}
|
}
|
||||||
List<Map<String, dynamic>> showLabel = [];
|
List<Map<String, dynamic>> showLabel = [];
|
||||||
if (target != null && target['type'] is List) {
|
if (target != null && target['type'] is List) {
|
||||||
showLabel = (target['type'] as List).map<Map<String, dynamic>>((item) {
|
showLabel = (target['type'] as List).map<Map<String, dynamic>>((item) {
|
||||||
return {
|
return {
|
||||||
'key': item['type'],
|
'key': item['type'],
|
||||||
'name': item['name'],
|
'name': item['name'],
|
||||||
'color': stringToColor(item['color']),
|
'color': stringToColor(item['color']),
|
||||||
};
|
};
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
return Container(
|
return Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: themeController.currentColor.sc5,
|
color: themeController.currentColor.sc5,
|
||||||
borderRadius: BorderRadius.circular(
|
borderRadius: BorderRadius.circular(
|
||||||
AppConstants().normal_container_radius), // 你可以按需调整圆角半径
|
AppConstants().normal_container_radius), // 你可以按需调整圆角半径
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(26.rpx, 29.rpx, 26.rpx, 45.rpx),
|
padding:
|
||||||
child: Column(
|
EdgeInsetsDirectional.fromSTEB(26.rpx, 29.rpx, 26.rpx, 45.rpx),
|
||||||
mainAxisSize: MainAxisSize.max,
|
child: Column(
|
||||||
children: [
|
mainAxisSize: MainAxisSize.max,
|
||||||
Container(
|
children: [
|
||||||
child: Row(
|
Container(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
child: Row(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
Text(
|
children: [
|
||||||
"皮肤指数".tr,
|
Text(
|
||||||
style: TextStyle(
|
"皮肤指数".tr,
|
||||||
color: themeController.currentColor.sc3,
|
style: TextStyle(
|
||||||
fontSize: AppConstants().title_text_fontSize),
|
color: themeController.currentColor.sc3,
|
||||||
),
|
fontSize: AppConstants().title_text_fontSize),
|
||||||
ClickableContainer(
|
),
|
||||||
backgroundColor: Colors.transparent,
|
ClickableContainer(
|
||||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
backgroundColor: Colors.transparent,
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
borderRadius: 0.rpx, // 圆形点击区域
|
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||||
onTap: () {
|
borderRadius: 0.rpx, // 圆形点击区域
|
||||||
showTipDialog(
|
onTap: () {
|
||||||
context,
|
showTipDialog(
|
||||||
Container(
|
context,
|
||||||
child: Text(
|
Container(
|
||||||
"皮肤指数介绍".tr,
|
child: Text(
|
||||||
style: TextStyle(
|
// "皮肤指数介绍".tr,
|
||||||
fontSize: 26.rpx,
|
"皮肤指数通过用户睡眠过程中的体征数据,计算皮肤电反应,生成综合评估指标,用于睡眠中的生理应激状态或自主神经活动。"
|
||||||
color: themeController.currentColor.sc3,
|
.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
color: themeController.currentColor.sc3,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0, 0.rpx, 0.rpx, 0), // 外部 padding 移到内部
|
||||||
|
width: 28.rpx,
|
||||||
|
height: 28.rpx,
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
'assets/img/icon/explain.svg',
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
color: themeController.currentColor.sc4,
|
||||||
),
|
),
|
||||||
);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0, 0.rpx, 0.rpx, 0), // 外部 padding 移到内部
|
|
||||||
width: 28.rpx,
|
|
||||||
height: 28.rpx,
|
|
||||||
child: SvgPicture.asset(
|
|
||||||
'assets/img/icon/explain.svg',
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
color: themeController.currentColor.sc4,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
SizedBox(
|
||||||
SizedBox(
|
height: 83.rpx,
|
||||||
height: 83.rpx,
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding:
|
|
||||||
EdgeInsetsDirectional.fromSTEB(30.rpx, 0.rpx, 30.rpx, 0.rpx),
|
|
||||||
child: StatusBarWithIndicator(
|
|
||||||
selectKey: target['value'],
|
|
||||||
showLabel: showLabel,
|
|
||||||
),
|
),
|
||||||
),
|
Padding(
|
||||||
SizedBox(
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
height: 56.rpx,
|
30.rpx, 0.rpx, 30.rpx, 0.rpx),
|
||||||
),
|
child: StatusBarWithIndicator(
|
||||||
],
|
selectKey: target['value'],
|
||||||
|
showLabel: showLabel,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 56.rpx,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
);
|
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
es.EasyDartModule.logger.error("打鼾监测绘制异常${e}");
|
es.EasyDartModule.logger.error("打鼾监测绘制异常${e}");
|
||||||
return Container();
|
return Container();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,10 +53,8 @@ class _SleepViewWidgetState extends State<SleepViewWidget> {
|
|||||||
List lightSnore = widget.sleepReport['ssp']['data'][0];
|
List lightSnore = widget.sleepReport['ssp']['data'][0];
|
||||||
List heavySnore = widget.sleepReport['ssp']['data'][1];
|
List heavySnore = widget.sleepReport['ssp']['data'][1];
|
||||||
|
|
||||||
|
|
||||||
snoreValues = [...lightSnore, ...heavySnore];
|
snoreValues = [...lightSnore, ...heavySnore];
|
||||||
|
|
||||||
|
|
||||||
snoreValues.sort((a, b) {
|
snoreValues.sort((a, b) {
|
||||||
return a['st'].compareTo(b['st']);
|
return a['st'].compareTo(b['st']);
|
||||||
});
|
});
|
||||||
@@ -100,7 +98,7 @@ class _SleepViewWidgetState extends State<SleepViewWidget> {
|
|||||||
context,
|
context,
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
"睡眠规律性介绍",
|
"睡眠规律性是指个体睡眠模式在时间、时长、环境等方面呈现出的稳定性和一致性,是衡量睡眠质量的重要指标之一。",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
@@ -173,7 +171,7 @@ class _SleepViewWidgetState extends State<SleepViewWidget> {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
height: 43.rpx,
|
height: 20.rpx,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@@ -328,7 +326,7 @@ class _SleepViewWidgetState extends State<SleepViewWidget> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
es.EasyDartModule.logger.error("打鼾监测绘制异常${e}");
|
es.EasyDartModule.logger.error("打鼾监测绘制异常${e}");
|
||||||
return Container();
|
return Container();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,7 +127,8 @@ class _SnoreViewWidgetWidgetState extends State<SnoreViewWidgetWidget> {
|
|||||||
context,
|
context,
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
"打鼾监测介绍。",
|
// "打鼾监测介绍。",
|
||||||
|
"打鼾监测是指用户在睡眠过程中打鼾频次的图表说明。",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
|
|||||||
@@ -98,7 +98,8 @@ class _ZiZhuShenJingPercentWidgetState
|
|||||||
context,
|
context,
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
"自主神经平衡指数监测介绍".tr,
|
// "自主神经平衡指数监测介绍".tr,
|
||||||
|
"自主神经平衡指数 是评估人体自主神经系统(ANS)功能状态的重要指标,主要反映交感神经和副交感神经的活性平衡关系。".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
|
|||||||
Reference in New Issue
Block a user