更新睡眠的心率基准图不显示

This commit is contained in:
wyf
2025-07-17 10:06:13 +08:00
parent 80d6670ad9
commit f8cecba68b
95 changed files with 8859 additions and 9047 deletions

View File

@@ -87,481 +87,467 @@ class _EPageState extends State<LoginPage> {
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, bodysize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/img/bgImage.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: SafeArea(
top: true,
child: Padding(
padding:
EdgeInsetsDirectional.fromSTEB(75.rpx, 0.rpx, 75.rpx, 0),
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/img/bgImage.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: SafeArea(
top: true,
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(75.rpx, 0.rpx, 75.rpx, 0),
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
children: [
Column(
SizedBox(
height: 66.rpx,
),
ClickableContainer(
backgroundColor: Colors.transparent, // 容器背景色
highlightColor:
themeController.currentColor.sc21, // 点击时的背景色
padding: EdgeInsets.zero, // 这里去掉外部的 padding避免影响点击范围
onTap: () {
Get.back();
},
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
16.rpx, 10.rpx, 16.rpx, 10.rpx),
child: SvgPicture.asset(
'assets/img/icon/close.svg',
width: 25.rpx,
height: 25.rpx, // 如果 SVG 中没有固定颜色,使用 color 设置
color: themeController.currentColor.sc3,
),
),
),
],
),
Expanded(
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Align(
alignment: AlignmentDirectional(-1, 0),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0, 141.rpx, 0, 0),
child: Container(
width: double.infinity,
decoration: BoxDecoration(),
child: Align(
alignment: AlignmentDirectional(0, 0),
child: Text(
'登录页.欢迎使用太和e护'.tr,
style: TextStyle(
fontFamily: 'Inter',
fontSize: 48.rpx,
letterSpacing: 0.0,
//todo 颜色
color: themeController.currentColor.sc3,
),
),
),
),
),
),
Align(
alignment: AlignmentDirectional(-1, 0),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0, 15.rpx, 0, 0),
child: Container(
width: double.infinity,
decoration: BoxDecoration(),
child: Align(
alignment: AlignmentDirectional(0, 0),
child: Text(
'登录页.科技睡眠 洞悉万千'.tr,
style: TextStyle(
fontFamily: 'Inter',
fontSize: 30.rpx,
letterSpacing: 0.0,
//todo 颜色
color: themeController.currentColor.sc3,
),
),
),
),
),
),
Align(
alignment: AlignmentDirectional(-1, 0),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0, 95.rpx, 0, 0),
child: Container(
width: double.infinity,
decoration: BoxDecoration(),
child: Align(
alignment: AlignmentDirectional(0, 0),
child: Text(
'139****0733',
style: TextStyle(
fontFamily: 'Inter',
fontSize: 48.rpx,
letterSpacing: 0.0,
//todo 颜色
color: themeController.currentColor.sc3,
),
),
),
),
),
),
Padding(
padding:
EdgeInsetsDirectional.fromSTEB(0, 35.rpx, 0, 0),
child: CustomCard(
borderRadius: AppConstants()
.button_container_radius, // 圆角半径
onTap: () {
TopSlideNotification.show(context,
text: "待开发功能".tr);
bool agree =
loginController.model.register_agree!;
if (!agree) {
print('未授权 ...');
} else {
print('已授权 ...');
}
},
colors: [
//todo 颜色
themeController.currentColor.sc1,
themeController.currentColor.sc2,
], // 渐变色是同一个色,也可以根据需要调整
child: Container(
width: bodysize.maxWidth,
height:
MediaQuery.sizeOf(context).height * 0.055,
constraints: BoxConstraints(
minWidth: 500.rpx,
minHeight: 90.rpx,
),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Text(
textAlign: TextAlign.center,
'登录页.本机号码一键登录/注册'.tr,
style: TextStyle(
//todo 颜色
color:
themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize: AppConstants()
.normal_text_fontSize,
letterSpacing: 0.0,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
].divide(SizedBox(
width: 17.rpx,
)),
),
),
),
),
SizedBox(
height: 66.rpx,
height: 20.rpx,
),
ClickableContainer(
backgroundColor: Colors.transparent, // 容器背景色
highlightColor:
themeController.currentColor.sc21, // 点击时的背景色
padding:
EdgeInsets.zero, // 这里去掉外部的 padding避免影响点击范围
padding: EdgeInsetsDirectional.fromSTEB(
16.rpx, 10.rpx, 16.rpx, 10.rpx),
onTap: () {
Get.back();
print('点击了容器');
Get.toNamed("/otherLoginPage");
},
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
16.rpx, 10.rpx, 16.rpx, 10.rpx),
child: SvgPicture.asset(
'assets/img/icon/close.svg',
width: 25.rpx,
height: 25.rpx, // 如果 SVG 中没有固定颜色,使用 color 设置
child: Text(
'登录页.其他手机号码'.tr, // 子组件内容
style: TextStyle(
fontFamily: 'Inter',
fontSize: 26.rpx,
color: themeController.currentColor.sc3,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
25.rpx, 136.rpx, 25.rpx, 50.rpx),
child: Container(
width: double.infinity,
decoration: BoxDecoration(),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Theme(
data: ThemeData(
checkboxTheme: CheckboxThemeData(
visualDensity: VisualDensity.compact,
materialTapTargetSize:
MaterialTapTargetSize.shrinkWrap,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(64),
),
),
unselectedWidgetColor:
Color(0xFFD3D3D3),
),
child: Obx(
() => Checkbox(
value: loginController
.model.register_agree ??
false,
onChanged: (newValue) async {
loginController.model
.register_agree = newValue;
loginController.updateAll();
// 获取设备信息,需要用户点击确认隐私协议与用户协议选择框时才能获取
// if (newValue == true) {
// Deviceconfig
// .initPlatformState();
// }
},
side: BorderSide(
width: 1.5,
color: Colors.white,
),
activeColor: stringToColor("#FF9F66"),
checkColor: Colors.white,
),
)),
Expanded(
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0.rpx, 10.rpx, 0.rpx, 0.rpx),
child: Container(
width: bodysize.maxWidth,
constraints: BoxConstraints(
minWidth: 500.rpx,
minHeight: 90.rpx,
),
child: RichText(
text: TextSpan(
children: [
TextSpan(
text: '登录页.协议1'.tr,
style: TextStyle(
fontFamily: 'Inter',
letterSpacing: 0.0,
fontSize: 26.rpx,
color: Colors
.white, // 可以调整为你想要的颜色
),
),
TextSpan(
text: '登录页.协议2'.tr,
style: TextStyle(
fontFamily: 'Inter',
letterSpacing: 0.0,
fontSize: 26.rpx,
color:
stringToColor("#FF9F66"),
),
),
TextSpan(
text: '登录页.协议3'.tr,
style: TextStyle(
fontFamily: 'Inter',
letterSpacing: 0.0,
fontSize: 26.rpx,
color: Colors
.white, // 可以调整为你想要的颜色
),
),
TextSpan(
text: '登录页.协议4'.tr,
style: TextStyle(
fontFamily: 'Inter',
letterSpacing: 0.0,
fontSize: 26.rpx,
color:
stringToColor("#FF9F66"),
),
),
TextSpan(
text: '登录页.协议5'.tr,
style: TextStyle(
fontFamily: 'Inter',
letterSpacing: 0.0,
fontSize: 26.rpx,
color: Colors
.white, // 可以调整为你想要的颜色
),
),
TextSpan(
text: '登录页.协议6'.tr,
style: TextStyle(
fontFamily: 'Inter',
letterSpacing: 0.0,
fontSize: 26.rpx,
color:
stringToColor("#FF9F66"),
),
),
],
),
),
),
),
),
].divide(SizedBox(width: 18.rpx)),
),
),
),
],
),
Expanded(
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Align(
alignment: AlignmentDirectional(-1, 0),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0, 141.rpx, 0, 0),
child: Container(
width: double.infinity,
decoration: BoxDecoration(),
child: Align(
alignment: AlignmentDirectional(0, 0),
child: Text(
'登录页.欢迎使用太和e护'.tr,
style: TextStyle(
fontFamily: 'Inter',
fontSize: 48.rpx,
letterSpacing: 0.0,
//todo 颜色
color:
themeController.currentColor.sc3,
),
),
),
),
),
),
Align(
alignment: AlignmentDirectional(-1, 0),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0, 15.rpx, 0, 0),
child: Container(
width: double.infinity,
decoration: BoxDecoration(),
child: Align(
alignment: AlignmentDirectional(0, 0),
child: Text(
'登录页.科技睡眠 洞悉万千'.tr,
style: TextStyle(
fontFamily: 'Inter',
fontSize: 30.rpx,
letterSpacing: 0.0,
//todo 颜色
color:
themeController.currentColor.sc3,
),
),
),
),
),
),
Align(
alignment: AlignmentDirectional(-1, 0),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0, 95.rpx, 0, 0),
child: Container(
width: double.infinity,
decoration: BoxDecoration(),
child: Align(
alignment: AlignmentDirectional(0, 0),
child: Text(
'139****0733',
style: TextStyle(
fontFamily: 'Inter',
fontSize: 48.rpx,
letterSpacing: 0.0,
//todo 颜色
color:
themeController.currentColor.sc3,
),
),
),
),
),
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0, 35.rpx, 0, 0),
child: CustomCard(
borderRadius: AppConstants()
.button_container_radius, // 圆角半径
onTap: () {
TopSlideNotification.show(context,
text: "待开发功能".tr);
bool agree =
loginController.model.register_agree!;
if (!agree) {
print('未授权 ...');
} else {
print('已授权 ...');
}
},
colors: [
//todo 颜色
themeController.currentColor.sc1,
themeController.currentColor.sc2,
], // 渐变色是同一个色,也可以根据需要调整
child: Container(
width: bodysize.maxWidth,
height: MediaQuery.sizeOf(context).height *
0.055,
constraints: BoxConstraints(
minWidth: 500.rpx,
minHeight: 90.rpx,
),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Expanded(
child: Text(
textAlign: TextAlign.center,
'登录页.本机号码一键登录/注册'.tr,
style: TextStyle(
//todo 颜色
color: themeController
.currentColor.sc3,
fontFamily: 'Inter',
fontSize: AppConstants()
.normal_text_fontSize,
letterSpacing: 0.0,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
].divide(SizedBox(
width: 17.rpx,
)),
),
),
),
),
SizedBox(
height: 20.rpx,
),
ClickableContainer(
backgroundColor: Colors.transparent, // 容器背景色
highlightColor: themeController
.currentColor.sc21, // 点击时的背景色
padding: EdgeInsetsDirectional.fromSTEB(
16.rpx, 10.rpx, 16.rpx, 10.rpx),
onTap: () {
print('点击了容器');
Get.toNamed("/otherLoginPage");
},
child: Text(
'登录页.其他手机号码'.tr, // 子组件内容
style: TextStyle(
fontFamily: 'Inter',
fontSize: 26.rpx,
color: themeController.currentColor.sc3,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
25.rpx, 136.rpx, 25.rpx, 50.rpx),
child: Container(
width: double.infinity,
decoration: BoxDecoration(),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Theme(
data: ThemeData(
checkboxTheme: CheckboxThemeData(
visualDensity:
VisualDensity.compact,
materialTapTargetSize:
MaterialTapTargetSize
.shrinkWrap,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(64),
),
),
unselectedWidgetColor:
Color(0xFFD3D3D3),
),
child: Obx(
() => Checkbox(
value: loginController
.model.register_agree ??
false,
onChanged: (newValue) async {
loginController.model
.register_agree = newValue;
loginController.updateAll();
// 获取设备信息,需要用户点击确认隐私协议与用户协议选择框时才能获取
// if (newValue == true) {
// Deviceconfig
// .initPlatformState();
// }
},
side: BorderSide(
width: 1.5,
color: Colors.white,
),
activeColor:
stringToColor("#FF9F66"),
checkColor:
Colors.white,
),
)),
Expanded(
child: Padding(
padding:
EdgeInsetsDirectional.fromSTEB(
0.rpx, 10.rpx, 0.rpx, 0.rpx),
child: Container(
width: bodysize.maxWidth,
constraints: BoxConstraints(
minWidth: 500.rpx,
minHeight: 90.rpx,
),
child: RichText(
text: TextSpan(
children: [
TextSpan(
text: '登录页.协议1'.tr,
style: TextStyle(
fontFamily: 'Inter',
letterSpacing: 0.0,
fontSize: 26.rpx,
color: Colors
.white, // 可以调整为你想要的颜色
),
),
TextSpan(
text: '登录页.协议2'.tr,
style: TextStyle(
fontFamily: 'Inter',
letterSpacing: 0.0,
fontSize: 26.rpx,
color: stringToColor(
"#FF9F66"),
),
),
TextSpan(
text: '登录页.协议3'.tr,
style: TextStyle(
fontFamily: 'Inter',
letterSpacing: 0.0,
fontSize: 26.rpx,
color: Colors
.white, // 可以调整为你想要的颜色
),
),
TextSpan(
text: '登录页.协议4'.tr,
style: TextStyle(
fontFamily: 'Inter',
letterSpacing: 0.0,
fontSize: 26.rpx,
color: stringToColor(
"#FF9F66"),
),
),
TextSpan(
text: '登录页.协议5'.tr,
style: TextStyle(
fontFamily: 'Inter',
letterSpacing: 0.0,
fontSize: 26.rpx,
color: Colors
.white, // 可以调整为你想要的颜色
),
),
TextSpan(
text: '登录页.协议6'.tr,
style: TextStyle(
fontFamily: 'Inter',
letterSpacing: 0.0,
fontSize: 26.rpx,
color: stringToColor(
"#FF9F66"),
),
),
],
),
),
),
),
),
].divide(SizedBox(width: 18.rpx)),
),
),
),
],
),
),
Container(
width: double.infinity,
height: MediaQuery.sizeOf(context).height * 0.136,
constraints: BoxConstraints(
minHeight: 220.rpx,
),
decoration: BoxDecoration(),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Padding(
padding:
EdgeInsetsDirectional.fromSTEB(0, 0, 0, 36.rpx),
child: Text(
'登录页.其他登录方式'.tr,
style: TextStyle(
fontFamily: 'Inter',
fontSize: 26.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
),
),
),
Container(
width: double.infinity,
height: MediaQuery.sizeOf(context).height * 0.136,
constraints: BoxConstraints(
minHeight: 220.rpx,
),
decoration: BoxDecoration(),
child: Column(
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0, 0, 0, 36.rpx),
child: Text(
'登录页.其他登录方式'.tr,
style: TextStyle(
fontFamily: 'Inter',
fontSize: 26.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
ClickableContainer(
backgroundColor: Colors.white, // 背景色
highlightColor: Colors.grey, // 点击水波纹颜色
borderRadius: 999.rpx,
padding: EdgeInsets.zero,
// onTap: () {
// TopSlideNotification.show(context,
// text: "待开发功能".tr);
// },
onTap: () async {
//loginController.model.isIos == true &&
if (loginController.model.register_agree ==
null ||
loginController.model.register_agree !=
true) {
TopSlideNotification.show(
context,
text: "登录页.未同意协议".tr,
textColor: themeController.currentColor.sc9,
);
return;
}
await loginController.wxLoginSendAuth(context);
},
child: Container(
width: 91.rpx,
height: 91.rpx,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
shape: BoxShape.circle,
),
child: Image.asset(
"assets/img/wechat.png",
width: 30.rpx,
height: 30.rpx,
),
),
),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
ClickableContainer(
backgroundColor: Colors.white, // 背景色
highlightColor: Colors.grey, // 点击水波纹颜色
borderRadius: 999.rpx,
padding: EdgeInsets.zero,
// onTap: () {
// TopSlideNotification.show(context,
// text: "待开发功能".tr);
// },
onTap: () async {
//loginController.model.isIos == true &&
if (loginController.model.register_agree ==
null ||
loginController.model.register_agree !=
true) {
TopSlideNotification.show(
context,
text: "登录页.未同意协议".tr,
textColor:
themeController.currentColor.sc9,
);
return;
}
await loginController
.wxLoginSendAuth(context);
},
child: Container(
width: 91.rpx,
height: 91.rpx,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
shape: BoxShape.circle,
),
child: Image.asset(
"assets/img/wechat.png",
width: 30.rpx,
height: 30.rpx,
),
),
ClickableContainer(
backgroundColor: Colors.white,
highlightColor: Colors.grey,
borderRadius: 999.rpx,
padding: EdgeInsets.zero,
onTap: () {
TopSlideNotification.show(context,
text: "待开发功能".tr);
},
child: Container(
width: 91.rpx,
height: 91.rpx,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
shape: BoxShape.circle,
),
ClickableContainer(
backgroundColor: Colors.white,
highlightColor: Colors.grey,
borderRadius: 999.rpx,
padding: EdgeInsets.zero,
onTap: () {
TopSlideNotification.show(context,
text: "待开发功能".tr);
},
child: Container(
width: 91.rpx,
height: 91.rpx,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
shape: BoxShape.circle,
),
child: Image.asset(
"assets/img/tel.png",
width: 30.rpx,
height: 30.rpx,
),
),
child: Image.asset(
"assets/img/tel.png",
width: 30.rpx,
height: 30.rpx,
),
ClickableContainer(
backgroundColor: Colors.white,
highlightColor: Colors.grey,
borderRadius: 999.rpx,
padding: EdgeInsets.zero,
onTap: () {
TopSlideNotification.show(context,
text: "待开发功能".tr);
},
child: Container(
width: 91.rpx,
height: 91.rpx,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
shape: BoxShape.circle,
),
child: Image.asset(
"assets/img/google.png",
width: 30.rpx,
height: 30.rpx,
),
),
),
].divide(SizedBox(width: 35.rpx)),
),
),
],
ClickableContainer(
backgroundColor: Colors.white,
highlightColor: Colors.grey,
borderRadius: 999.rpx,
padding: EdgeInsets.zero,
onTap: () {
TopSlideNotification.show(context,
text: "待开发功能".tr);
},
child: Container(
width: 91.rpx,
height: 91.rpx,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
shape: BoxShape.circle,
),
child: Image.asset(
"assets/img/google.png",
width: 30.rpx,
height: 30.rpx,
),
),
),
].divide(SizedBox(width: 35.rpx)),
),
),
],
],
),
),
),
],
),
),
)),
),
),
)),
);
}
}