多语言后端数据

This commit is contained in:
czz
2025-08-01 22:25:47 +08:00
parent 12a53ac36c
commit a199606f80
52 changed files with 1736 additions and 1142 deletions

View File

@@ -78,13 +78,20 @@ class _AIAdviceWidgetState extends State<AIAdviceWidget> {
Container(
child: Text(
// "AI分析介绍".tr,
"AI分析是指利用人工智能技术对用户的睡眠数据进行自动化处理与规律提取对用户的异常睡眠数据给到一定的辅助决策或者解决问题。".tr,
"AI分析是指利用人工智能技术对用户的睡眠数据进行自动化处理与规律提取对用户的异常睡眠数据给到一定的辅助决策或者解决问题。"
.tr,
style: TextStyle(
fontSize: 26.rpx,
color: themeController.currentColor.sc3,
color: Colors.black,
),
),
),
backgroundColor: Color(0xFFFFFFFF),
colors: [
Color(0XFF1592AA),
Color(0xFF0C83A7),
Color(0xFF006FA3)
],
);
},
child: Container(

View File

@@ -101,10 +101,16 @@ class _SnoreViewWidgetWidgetState extends State<BreathePauseNewWidget> {
"呼吸暂停监测是指用户在睡眠过程中产生的呼吸暂停的图表说明。",
style: TextStyle(
fontSize: 26.rpx,
color: themeController.currentColor.sc3,
color: Colors.black,
),
),
),
backgroundColor: Color(0xFFFFFFFF),
colors: [
Color(0XFF1592AA),
Color(0xFF0C83A7),
Color(0xFF006FA3)
],
);
},
child: Container(

View File

@@ -144,10 +144,16 @@ class _BreatheStandardWidgetState extends State<BreatheStandardWidget> {
.tr,
style: TextStyle(
fontSize: 26.rpx,
color: themeController.currentColor.sc3,
color: Colors.black,
),
),
),
backgroundColor: Color(0xFFFFFFFF),
colors: [
Color(0XFF1592AA),
Color(0xFF0C83A7),
Color(0xFF006FA3)
],
);
},
child: Container(

View File

@@ -36,172 +36,180 @@ class _CompareSleepWidgetState extends State<CompareSleepWidget> {
@override
Widget build(BuildContext context) {
try {
if (widget.sleepReport == null ||
widget.sleepReport['yc'] == null ||
widget.sleepReport['yc'].isEmpty) {
return Container();
}
List<Map<String, dynamic>> data = (widget.sleepReport['yc'] as List)
.map((e) => e as Map<String, dynamic>)
.toList();
Map<String, double> today = {};
Map<String, double> yesterday = {};
try {
if (widget.sleepReport == null ||
widget.sleepReport['yc'] == null ||
widget.sleepReport['yc'].isEmpty) {
return Container();
}
List<Map<String, dynamic>> data = (widget.sleepReport['yc'] as List)
.map((e) => e as Map<String, dynamic>)
.toList();
Map<String, double> today = {};
Map<String, double> yesterday = {};
for (var item in data) {
String typeKey = 'type${item['id']}';
today[typeKey] = (item['t'] as num).toDouble();
yesterday[typeKey] = (item['y'] as num).toDouble();
}
return Container(
width: double.infinity,
decoration: BoxDecoration(
color: themeController.currentColor.sc5,
borderRadius: BorderRadius.circular(
AppConstants().normal_container_radius), // 你可以按需调整圆角半径
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(26.rpx, 29.rpx, 26.rpx, 45.rpx),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"与昨日对比分析".tr,
style: TextStyle(
color: themeController.currentColor.sc3,
fontSize: AppConstants().title_text_fontSize),
),
ClickableContainer(
backgroundColor: Colors.transparent,
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
padding: EdgeInsetsDirectional.fromSTEB(
14.rpx, 0.rpx, 14.rpx, 0), //
borderRadius: 0.rpx, // 圆形点击区域
onTap: () {
showTipDialog(
context,
Container(
child: Text(
// "与昨日对比分析介绍".tr,
"基于时间维度的横向比较分析方法,通过将当前(今日)的数据、状态、行为等与前一日(昨日)的同类信息进行对照,识别差异、趋势或变化规律,查看用户短期时间序列的动态变化。".tr,
style: TextStyle(
fontSize: 26.rpx,
color: themeController.currentColor.sc3,
for (var item in data) {
String typeKey = 'type${item['id']}';
today[typeKey] = (item['t'] as num).toDouble();
yesterday[typeKey] = (item['y'] as num).toDouble();
}
return Container(
width: double.infinity,
decoration: BoxDecoration(
color: themeController.currentColor.sc5,
borderRadius: BorderRadius.circular(
AppConstants().normal_container_radius), // 你可以按需调整圆角半径
),
child: Padding(
padding:
EdgeInsetsDirectional.fromSTEB(26.rpx, 29.rpx, 26.rpx, 45.rpx),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"与昨日对比分析".tr,
style: TextStyle(
color: themeController.currentColor.sc3,
fontSize: AppConstants().title_text_fontSize),
),
ClickableContainer(
backgroundColor: Colors.transparent,
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
padding: EdgeInsetsDirectional.fromSTEB(
14.rpx, 0.rpx, 14.rpx, 0), //
borderRadius: 0.rpx, // 圆形点击区域
onTap: () {
showTipDialog(
context,
Container(
child: Text(
// "与昨日对比分析介绍".tr,
"基于时间维度的横向比较分析方法,通过将当前(今日)的数据、状态、行为等与前一日(昨日)的同类信息进行对照,识别差异、趋势或变化规律,查看用户短期时间序列的动态变化。"
.tr,
style: TextStyle(
fontSize: 26.rpx,
color: Colors.black,
),
),
),
backgroundColor: Color(0xFFFFFFFF),
colors: [
Color(0XFF1592AA),
Color(0xFF0C83A7),
Color(0xFF006FA3)
],
);
},
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(
),
),
],
),
),
SizedBox(
height: 31.rpx,
),
// Padding(
// padding:
// EdgeInsetsDirectional.fromSTEB(30.rpx, 0.rpx, 30.rpx, 0.rpx),
// child: SleepRadarChart(
// today: today,
// yesterday: yesterday,
// ),
// ),
Padding(
padding:
EdgeInsetsDirectional.fromSTEB(0.rpx, 0.rpx, 30.rpx, 0.rpx),
child: Stack(
children: [
// 雷达图
Padding(
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,
30.rpx, 0.rpx, 0.rpx, 0.rpx),
child: SleepRadarChart(
// today: today,
// yesterday: yesterday,
data: data,
),
),
),
],
),
),
SizedBox(
height: 31.rpx,
),
// Padding(
// padding:
// EdgeInsetsDirectional.fromSTEB(30.rpx, 0.rpx, 30.rpx, 0.rpx),
// child: SleepRadarChart(
// today: today,
// yesterday: yesterday,
// ),
// ),
Padding(
padding:
EdgeInsetsDirectional.fromSTEB(0.rpx, 0.rpx, 30.rpx, 0.rpx),
child: Stack(
children: [
// 雷达图
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
30.rpx, 0.rpx, 0.rpx, 0.rpx),
child: SleepRadarChart(
// today: today,
// yesterday: yesterday,
data: data,
),
),
// 在左侧添加一个 Text
Positioned(
left: 0, // 这里可以修改文本左边的距离
top: 0, // 这里可以修改文本顶部的距离
child: Container(
color: Colors.transparent, // 不需要背景色,可以去掉
child: Column(
children: [
Row(
children: [
// 长条容器
Container(
width:
34.rpx, // 你可以设置容器的宽度,或者使用 Expanded 填充剩余空间
height: 2.rpx, // 容器的高度
color: stringToColor("#00C1AA"), // 容器的颜色
),
SizedBox(width: 13.rpx), // 文字和容器之间的间距
// 文字
Text(
'今日数据'.tr, // 文字内容
style: TextStyle(
fontSize: 18.rpx, // 文字大小
color:
themeController.currentColor.sc4, // 文字颜色
// 在左侧添加一个 Text
Positioned(
left: 0, // 这里可以修改文本左边的距离
top: 0, // 这里可以修改文本顶部的距离
child: Container(
color: Colors.transparent, // 不需要背景色,可以去掉
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
// 长条容器
Container(
width:
34.rpx, // 你可以设置容器的宽度,或者使用 Expanded 填充剩余空间
height: 2.rpx, // 容器的高度
color: stringToColor("#00C1AA"), // 容器的颜色
),
),
],
),
Row(
children: [
// 长条容器
Container(
width:
34.rpx, // 你可以设置容器的宽度,或者使用 Expanded 填充剩余空间
height: 2.rpx, // 容器的高度
color: stringToColor("#FFD251"), // 容器的颜色
),
SizedBox(width: 13.rpx), // 文字和容器之间的间距
// 文字
Text(
'昨日数据'.tr, // 文字内容
style: TextStyle(
fontSize: 18.rpx, // 文字大小
color:
themeController.currentColor.sc4, // 文字颜色
SizedBox(width: 13.rpx), // 文字和容器之间的间距
// 文字
Text(
'今日数据'.tr, // 文字内容
style: TextStyle(
fontSize: 18.rpx, // 文字大小
color: themeController
.currentColor.sc4, // 文字颜色
),
),
),
],
),
].divide(SizedBox(height: 25.rpx)),
],
),
Row(
children: [
// 长条容器
Container(
width:
34.rpx, // 你可以设置容器的宽度,或者使用 Expanded 填充剩余空间
height: 2.rpx, // 容器的高度
color: stringToColor("#FFD251"), // 容器的颜色
),
SizedBox(width: 13.rpx), // 文字和容器之间的间距
// 文字
Text(
'昨日数据'.tr, // 文字内容
style: TextStyle(
fontSize: 18.rpx, // 文字大小
color: themeController
.currentColor.sc4, // 文字颜色
),
),
],
),
].divide(SizedBox(height: 25.rpx)),
),
),
),
),
],
],
),
),
),
],
],
),
),
),
);
} catch (e) {
);
} catch (e) {
es.EasyDartModule.logger.error("打鼾监测绘制异常${e}");
return Container();
}
return Container();
}
}
}

View File

@@ -18,7 +18,6 @@ class DiseasePercentsWidget extends StatefulWidget {
}
class _DiseasePercentsWidgetState extends State<DiseasePercentsWidget> {
@override
void setState(VoidCallback callback) {
super.setState(callback);
@@ -37,89 +36,96 @@ class _DiseasePercentsWidgetState extends State<DiseasePercentsWidget> {
@override
Widget build(BuildContext context) {
try {
if (widget.sleepReport == null ||
widget.sleepReport['cdri'] == null ||
widget.sleepReport['cdri'].isEmpty) {
return Container();
}
List diseaseData = widget.sleepReport['cdri'];
var showLabel = convertDiseaseData(diseaseData);
return Container(
width: double.infinity,
decoration: BoxDecoration(
color: themeController.currentColor.sc5,
borderRadius: BorderRadius.circular(
AppConstants().normal_container_radius), // 你可以按需调整圆角半径
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(26.rpx, 29.rpx, 26.rpx, 45.rpx),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"慢性病风险指数".tr,
style: TextStyle(
color: themeController.currentColor.sc3,
fontSize: AppConstants().title_text_fontSize),
),
ClickableContainer(
backgroundColor: Colors.transparent,
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
padding: EdgeInsetsDirectional.fromSTEB(
14.rpx, 0.rpx, 14.rpx, 0), //
borderRadius: 0.rpx, // 圆形点击区域
onTap: () {
// 你的点击逻辑
showTipDialog(
context,
Container(
child: Text(
// "慢性病风险指数介绍".tr,
"慢性病风险指数是通过整合个体的生理指标、生活方式等多维度数据,构建的量化评估模型,用于预测用户未来患慢性非传染性疾病(如高血压、糖尿病、冠心病、癌症等)的风险概率。".tr,
style: TextStyle(
fontSize: 26.rpx,
color: themeController.currentColor.sc3,
if (widget.sleepReport == null ||
widget.sleepReport['cdri'] == null ||
widget.sleepReport['cdri'].isEmpty) {
return Container();
}
List diseaseData = widget.sleepReport['cdri'];
var showLabel = convertDiseaseData(diseaseData);
return Container(
width: double.infinity,
decoration: BoxDecoration(
color: themeController.currentColor.sc5,
borderRadius: BorderRadius.circular(
AppConstants().normal_container_radius), // 你可以按需调整圆角半径
),
child: Padding(
padding:
EdgeInsetsDirectional.fromSTEB(26.rpx, 29.rpx, 26.rpx, 45.rpx),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"慢性病风险指数".tr,
style: TextStyle(
color: themeController.currentColor.sc3,
fontSize: AppConstants().title_text_fontSize),
),
ClickableContainer(
backgroundColor: Colors.transparent,
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
padding: EdgeInsetsDirectional.fromSTEB(
14.rpx, 0.rpx, 14.rpx, 0), //
borderRadius: 0.rpx, // 圆形点击区域
onTap: () {
// 你的点击逻辑
showTipDialog(
context,
Container(
child: Text(
// "慢性病风险指数介绍".tr,
"慢性病风险指数是通过整合个体的生理指标、生活方式等多维度数据,构建的量化评估模型,用于预测用户未来患慢性非传染性疾病(如高血压、糖尿病、冠心病、癌症等)的风险概率。"
.tr,
style: TextStyle(
fontSize: 26.rpx,
color: Colors.black,
),
),
),
backgroundColor: Color(0xFFFFFFFF),
colors: [
Color(0XFF1592AA),
Color(0xFF0C83A7),
Color(0xFF006FA3)
],
);
},
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(
height: 34.rpx,
),
Container(
child: HorizontalBarChart(
showLabel: showLabel,
showPercent: true,
SizedBox(
height: 34.rpx,
),
),
],
Container(
child: HorizontalBarChart(
showLabel: showLabel,
showPercent: true,
),
),
],
),
),
),
);
);
} catch (e) {
es.EasyDartModule.logger.error("打鼾监测绘制异常${e}");
return Container();
es.EasyDartModule.logger.error("打鼾监测绘制异常${e}");
return Container();
}
}

View File

@@ -83,10 +83,16 @@ class _HeartChangeWidgetState extends State<HeartChangeWidget> {
"心率变异性HRV是指心脏每次跳动间隔时间的差异程度反映自主神经系统交感神经和副交感神经对心脏的调节能力是评估心血管健康和压力状态的重要指标。".tr,
style: TextStyle(
fontSize: 26.rpx,
color: themeController.currentColor.sc3,
color: Colors.black,
),
),
),
backgroundColor: Color(0xFFFFFFFF),
colors: [
Color(0XFF1592AA),
Color(0xFF0C83A7),
Color(0xFF006FA3)
],
);
},
child: Container(

View File

@@ -83,10 +83,16 @@ class _HeartHealthWidgetState extends State<HeartHealthWidget> {
"心率健康评估主要通过用户睡眠报告中的时间点、体征数据及HRV数据等信息来判断其心理健康水平、疲劳程度。".tr,
style: TextStyle(
fontSize: 26.rpx,
color: themeController.currentColor.sc3,
color: Colors.black,
),
),
),
backgroundColor: Color(0xFFFFFFFF),
colors: [
Color(0XFF1592AA),
Color(0xFF0C83A7),
Color(0xFF006FA3)
],
);
},
child: Container(

View File

@@ -97,13 +97,20 @@ class _HeartPointWidgetState extends State<HeartPointWidget> {
Container(
child: Text(
// "心率散点图介绍".tr,
"心电散点图是用非线性的图形方法描记的连续心冲击图的RR间期图因图形由散点组成又称散点图。".tr,
"心电散点图是用非线性的图形方法描记的连续心冲击图的RR间期图因图形由散点组成又称散点图。"
.tr,
style: TextStyle(
fontSize: 26.rpx,
color: themeController.currentColor.sc3,
color: Colors.black,
),
),
),
backgroundColor: Color(0xFFFFFFFF),
colors: [
Color(0XFF1592AA),
Color(0xFF0C83A7),
Color(0xFF006FA3)
],
);
},
child: Container(
@@ -151,7 +158,7 @@ class _HeartPointWidgetState extends State<HeartPointWidget> {
),
);
} catch (e) {
es.EasyDartModule.logger.error("打鼾监测绘制异常${e}");
es.EasyDartModule.logger.error("打鼾监测绘制异常${e}");
return Container();
}
}

View File

@@ -144,10 +144,16 @@ class _HeartRateStandardWidgetState extends State<HeartRateStandardWidget> {
.tr,
style: TextStyle(
fontSize: 26.rpx,
color: themeController.currentColor.sc3,
color: Colors.black,
),
),
),
backgroundColor: Color(0xFFFFFFFF),
colors: [
Color(0XFF1592AA),
Color(0xFF0C83A7),
Color(0xFF006FA3)
],
);
},
child: Container(

View File

@@ -100,10 +100,16 @@ class _SkinPercentWidgetState extends State<SkinPercentWidget> {
.tr,
style: TextStyle(
fontSize: 26.rpx,
color: themeController.currentColor.sc3,
color: Colors.black,
),
),
),
backgroundColor: Color(0xFFFFFFFF),
colors: [
Color(0XFF1592AA),
Color(0xFF0C83A7),
Color(0xFF006FA3)
],
);
},
child: Container(

View File

@@ -98,13 +98,20 @@ class _SleepViewWidgetState extends State<SleepViewWidget> {
context,
Container(
child: Text(
"睡眠规律性是指个体睡眠模式在时间、时长、环境等方面呈现出的稳定性和一致性,是衡量睡眠质量的重要指标之一。".tr,
"睡眠规律性是指个体睡眠模式在时间、时长、环境等方面呈现出的稳定性和一致性,是衡量睡眠质量的重要指标之一。"
.tr,
style: TextStyle(
fontSize: 26.rpx,
color: themeController.currentColor.sc3,
color: Colors.black,
),
),
),
backgroundColor: Color(0xFFFFFFFF),
colors: [
Color(0XFF1592AA),
Color(0xFF0C83A7),
Color(0xFF006FA3)
],
);
},
child: Container(

View File

@@ -131,10 +131,16 @@ class _SnoreViewWidgetWidgetState extends State<SnoreViewWidgetWidget> {
"打鼾监测是指用户在睡眠过程中打鼾频次的图表说明。",
style: TextStyle(
fontSize: 26.rpx,
color: themeController.currentColor.sc3,
color: Colors.black,
),
),
),
backgroundColor: Color(0xFFFFFFFF),
colors: [
Color(0XFF1592AA),
Color(0xFF0C83A7),
Color(0xFF006FA3)
],
);
},
child: Container(

View File

@@ -108,11 +108,22 @@ class AvgSleepScoreWidget extends StatelessWidget {
centerWidget: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
mediumLabel.tr,
style: TextStyle(
color: Colors.white,
fontSize: AppConstants().normal_text_fontSize,
// Text(
// mediumLabel.tr,
// style: TextStyle(
// color: Colors.white,
// fontSize: AppConstants().normal_text_fontSize,
// ),
// ),
Padding(
padding:
EdgeInsets.only(top: 12.rpx), // 👈 向下偏移的关键
child: Text(
mediumLabel.tr,
style: TextStyle(
color: Colors.white,
fontSize: AppConstants().normal_text_fontSize,
),
),
),
Text(

View File

@@ -102,10 +102,16 @@ class _ZiZhuShenJingPercentWidgetState
"自主神经平衡指数 是评估人体自主神经系统ANS功能状态的重要指标主要反映交感神经和副交感神经的活性平衡关系。".tr,
style: TextStyle(
fontSize: 26.rpx,
color: themeController.currentColor.sc3,
color: Colors.black,
),
),
),
backgroundColor: Color(0xFFFFFFFF),
colors: [
Color(0XFF1592AA),
Color(0xFF0C83A7),
Color(0xFF006FA3)
],
);
},
child: Container(

View File

@@ -52,56 +52,57 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
@override
void initState() {
if (Get.isRegistered<SleepReportController>(tag: widget.data["tag"]) ==
false) {
super.initState();
if (!Get.isRegistered<SleepReportController>(tag: widget.data["tag"])) {
Get.put(tag: widget.data["tag"], SleepReportController());
}
sleepReportController = Get.find(tag: widget.data["tag"]);
sleepReportController.sleepReport.value = {};
if (widget.data['date'] == null) {
widget.data['date'] = DateTime.now();
widget.data['date'] = DateTime.now().millisecondsSinceEpoch;
}
calendarController.selectedDate.value =
DateTime.fromMillisecondsSinceEpoch(widget.data['date']);
sleepReportController.selectedDate.value =
DateTime.fromMillisecondsSinceEpoch(widget.data['date']);
if (widget.data['type'] != null) {
sleepReportController.model.type = widget.data['type'];
} else {
sleepReportController.model.type = 1;
}
String date = MyUtils.formatToDate(widget.data['date']);
// String date = '2025-5-27';
requestWithLog(
// ✅ 延迟执行赋值逻辑
WidgetsBinding.instance.addPostFrameCallback((_) {
final selected = DateTime.fromMillisecondsSinceEpoch(widget.data['date']);
calendarController.selectedDate.value = selected;
sleepReportController.selectedDate.value = selected;
if (widget.data['type'] != null) {
sleepReportController.model.type = widget.data['type'];
} else {
sleepReportController.model.type = 1;
}
String date = MyUtils.formatToDate(widget.data['date']);
requestWithLog(
logTitle: "查询睡眠报告",
method: MyHttpMethod.get,
queryUrl:
"https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=${date}&type=${sleepReportController.model.type}",
"https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=$date&type=${sleepReportController.model.type}",
onSuccess: (res) {
print(res);
sleepReportController.sleepReport.value = res.data;
sleepReportController.updateAll();
_scrollToTargetComponent(sleepReportController.sleepReport);
},
onFailure: (res) {
try {
if (MainPageBBottomChange.getCurrentIndex() != null) {
if (MainPageBBottomChange.getCurrentIndex() == 1) {
TopSlideNotification.show(context,
text: res.msg!,
textColor: themeController.currentColor.sc9);
}
if (MainPageBBottomChange.getCurrentIndex() == 1) {
TopSlideNotification.show(context,
text: res.msg!, textColor: themeController.currentColor.sc9);
} else {
TopSlideNotification.show(context,
text: res.msg!, textColor: themeController.currentColor.sc9);
}
} catch (e) {
e;
}
} catch (_) {}
sleepReportController.sleepReport.value = {};
sleepReportController.updateAll();
print(res);
});
},
);
});
}
@override