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

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

Binary file not shown.

View File

@@ -237,7 +237,7 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
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(

View File

@@ -169,7 +169,6 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
print(res);
},
);
}
@override
@@ -181,7 +180,7 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
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(

View File

@@ -35,7 +35,7 @@ class _DeviceDetailPageState extends State<DeviceDetailPage> {
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(

View File

@@ -148,7 +148,7 @@ class _InstantBodyPageState extends State<InstantBodyPage>
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(

View File

@@ -38,7 +38,7 @@ class _MessageReviewPageState extends State<MessageReviewPage> {
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(

View File

@@ -61,7 +61,7 @@ class _AfterCalibrationPersonPageState
return WillPopScope(
child: LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(

View File

@@ -55,7 +55,7 @@ class _AfterUpdatePersonPageState extends State<AfterUpdatePersonPage> {
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(

View File

@@ -71,7 +71,7 @@ class _AfterWifiPagePersonState extends State<AfterWifiPagePerson> {
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(

View File

@@ -37,7 +37,7 @@ class _EPageState extends State<BindDeviceSuccess> {
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(

View File

@@ -271,7 +271,7 @@ class _BlueteethDevicePageState extends State<BlueteethDevicePage> {
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, boxConstraints) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(

View File

@@ -43,7 +43,7 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
requestWithLog(
logTitle: "查询用户消息配置",
method: MyHttpMethod.get,
queryUrl: queryUrl,
queryUrl: queryUrl,
onSuccess: (res) {
if (res.data == null || res.data.isEmpty) {
var data = {
@@ -169,7 +169,6 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
print(res);
},
);
}
@override
@@ -181,7 +180,7 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
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(
@@ -442,7 +441,9 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
],
),
Text(
AppConstants().ent_type == 1? "APP消息介绍".tr:"打开“欢睡科技”APP可以查看该设备的消息内容",
AppConstants().ent_type == 1
? "APP消息介绍".tr
: "打开“欢睡科技”APP可以查看该设备的消息内容",
style: TextStyle(
color: themeController.currentColor.sc4,
fontSize: AppConstants()
@@ -548,7 +549,9 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
],
),
Text(
AppConstants().ent_type == 1? "服务号消息介绍".tr:"无需打开“欢睡科技”APP关注欢睡智能睡眠研究所服务号后微信内即可接收该设备消息推送",
AppConstants().ent_type == 1
? "服务号消息介绍".tr
: "无需打开“欢睡科技”APP关注欢睡智能睡眠研究所服务号后微信内即可接收该设备消息推送",
style: TextStyle(
color: themeController.currentColor.sc4,
fontSize: AppConstants()

View File

@@ -59,7 +59,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
return WillPopScope(
child: LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(

View File

@@ -50,7 +50,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
return WillPopScope(
child: LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(

View File

@@ -59,7 +59,7 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
return WillPopScope(
child: LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(

View File

@@ -46,7 +46,7 @@ class _DeviceShareListPageState extends State<DeviceShareListPage> {
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, boxConstraints) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
@@ -175,8 +175,7 @@ class _DeviceShareListPageState extends State<DeviceShareListPage> {
),
errorBorder: OutlineInputBorder(
borderSide: BorderSide(
color:
Colors.white,
color: Colors.white,
width: 1.rpx,
),
borderRadius:
@@ -185,8 +184,7 @@ class _DeviceShareListPageState extends State<DeviceShareListPage> {
focusedErrorBorder:
OutlineInputBorder(
borderSide: BorderSide(
color:
Colors.white,
color: Colors.white,
width: 1.rpx,
),
borderRadius:

View File

@@ -39,7 +39,7 @@ class _DeviceSharePageState extends State<DeviceSharePage> {
RxBool flag2 = false.obs;
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(

View File

@@ -218,8 +218,7 @@ class _EPageState extends State<DeviceTypePage> {
},
side: BorderSide(
width: 1.5,
color:
Colors.white,
color: Colors.white,
),
activeColor:
stringToColor("#16C89F"),
@@ -295,7 +294,7 @@ class _EPageState extends State<DeviceTypePage> {
}
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(

View File

@@ -45,7 +45,7 @@ class _DeviceTypeListPageState extends State<DeviceTypeListPage> {
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(

View File

@@ -130,7 +130,7 @@ class _WifiPageState extends State<WifiPage> {
print("object");
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
@@ -516,7 +516,9 @@ class _WifiPageState extends State<WifiPage> {
),
filled:
false,
fillColor: Colors.white,
fillColor:
Colors
.white,
suffixIcon:
InkWell(
onTap:

View File

@@ -71,7 +71,7 @@ class _WifiPagePersonState extends State<WifiPagePerson> {
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(
@@ -459,7 +459,9 @@ class _WifiPagePersonState extends State<WifiPagePerson> {
),
filled:
false,
fillColor: Colors.white,
fillColor:
Colors
.white,
suffixIcon:
InkWell(
onTap:

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)),
),
),
],
],
),
),
),
],
),
),
)),
),
),
)),
);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -22,7 +22,7 @@ class _EPageState extends State<EPage> {
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, boxConstraints) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Scaffold(
appBar: AppBar(
backgroundColor: themeController.currentColor.sc17,

View File

@@ -30,7 +30,7 @@ class _FollowPageState extends State<FollowPage> {
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(
@@ -86,7 +86,9 @@ class _FollowPageState extends State<FollowPage> {
// child: widget.webView,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(AppConstants().ent_type == 1?'assets/img/followus.png':"assets/img/huanshuiF.png"), // 本地图片
image: AssetImage(AppConstants().ent_type == 1
? 'assets/img/followus.png'
: "assets/img/huanshuiF.png"), // 本地图片
fit: BoxFit.cover, // 填满整个 Container
),
),

View File

@@ -34,7 +34,7 @@ class _HelpPageState extends State<HelpPage> {
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(

View File

@@ -79,7 +79,7 @@ class _MessagePageState extends State<MessagePage> {
return LayoutBuilder(
builder: (context, boxConstraints) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
@@ -253,7 +253,6 @@ class _MessagePageState extends State<MessagePage> {
],
),
),
SizedBox(height: 17.rpx),
],
),

View File

@@ -39,7 +39,7 @@ class _MinePageState extends State<MinePage> {
int login = userInfoController.model.login!;
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(

View File

@@ -24,205 +24,198 @@ class _BackMovementPageState extends State<BackMovementPage> {
final double spacing = 34.rpx;
final double buttonHeight = 101.rpx;
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
child: Scaffold(
appBar: AppBar(
iconTheme: IconThemeData(color: themeController.currentColor.sc3),
backgroundColor: const Color(0xFF011C33), // 统一背景色
automaticallyImplyLeading: false,
titleSpacing: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'背部律动',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
appBar: AppBar(
iconTheme: IconThemeData(color: themeController.currentColor.sc3),
backgroundColor: const Color(0xFF011C33), // 统一背景色
automaticallyImplyLeading: false,
titleSpacing: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'背部律动',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
),
centerTitle: false,
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
backgroundColor: const Color(0xFF011C33),
body: Padding(
padding: EdgeInsets.fromLTRB(0.rpx, 0, 0.rpx, 0),
child: Column(
// crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
),
centerTitle: false,
),
backgroundColor: const Color(0xFF011C33),
body: Padding(
padding: EdgeInsets.fromLTRB(0.rpx, 0, 0.rpx, 0),
child: Column(
// crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SingleChildScrollView(
child: Column(
children: [
SingleChildScrollView(
child: Column(
children: [
SizedBox(height: 30.rpx),
Text(
'力度调节',
style: TextStyle(color: Colors.grey, fontSize: 30.rpx),
),
SizedBox(height: 148.rpx),
Text(
intensity.toInt().toString(),
style:
TextStyle(color: Colors.white, fontSize: 160.rpx),
),
SizedBox(height: 41.rpx),
SizedBox(
height: 451.rpx, // 外部容器高度固定
child: Stack(
children: [
// 左边的 强/弱 文本
Positioned(
left: 0,
top: 0,
bottom: 0,
child: SizedBox(
width: 60.rpx,
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text('',
style: TextStyle(
color: Colors.grey,
fontSize: 30.rpx)),
Text('',
style: TextStyle(
color: Colors.grey,
fontSize: 30.rpx)),
],
),
),
SizedBox(height: 30.rpx),
Text(
'力度调节',
style: TextStyle(color: Colors.grey, fontSize: 30.rpx),
),
SizedBox(height: 148.rpx),
Text(
intensity.toInt().toString(),
style: TextStyle(color: Colors.white, fontSize: 160.rpx),
),
SizedBox(height: 41.rpx),
SizedBox(
height: 451.rpx, // 外部容器高度固定
child: Stack(
children: [
// 左边的 强/弱 文本
Positioned(
left: 0,
top: 0,
bottom: 0,
child: SizedBox(
width: 60.rpx,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('',
style: TextStyle(
color: Colors.grey, fontSize: 30.rpx)),
Text('',
style: TextStyle(
color: Colors.grey, fontSize: 30.rpx)),
],
),
),
),
// 右侧 slider27.rpx 后居中
Positioned(
left: 60.rpx - 27.rpx, // 60 是文字宽度27 是间隔
right: 0,
top: 0,
bottom: 0,
child: Center(
child: Transform.rotate(
angle: -math.pi / 2,
child: ConstrainedBox(
constraints: BoxConstraints(
minHeight: 451.rpx,
maxHeight: 451.rpx,
),
child: SliderTheme(
data: SliderTheme.of(context).copyWith(
trackHeight: 60.rpx,
thumbShape: RoundSliderThumbShape(
enabledThumbRadius: 45.rpx),
overlayShape:
const RoundSliderOverlayShape(
overlayRadius: 20),
),
child: Slider(
value: intensity,
min: 1,
max: 6,
divisions: 7,
activeColor: Colors.cyanAccent,
inactiveColor: Colors.blue.shade900,
onChanged: (value) {
setState(() {
intensity = value;
});
},
),
),
// 右侧 slider27.rpx 后居中
Positioned(
left: 60.rpx - 27.rpx, // 60 是文字宽度27 是间隔
right: 0,
top: 0,
bottom: 0,
child: Center(
child: Transform.rotate(
angle: -math.pi / 2,
child: ConstrainedBox(
constraints: BoxConstraints(
minHeight: 451.rpx,
maxHeight: 451.rpx,
),
child: SliderTheme(
data: SliderTheme.of(context).copyWith(
trackHeight: 60.rpx,
thumbShape: RoundSliderThumbShape(
enabledThumbRadius: 45.rpx),
overlayShape: const RoundSliderOverlayShape(
overlayRadius: 20),
),
child: Slider(
value: intensity,
min: 1,
max: 6,
divisions: 7,
activeColor: Colors.cyanAccent,
inactiveColor: Colors.blue.shade900,
onChanged: (value) {
setState(() {
intensity = value;
});
},
),
),
),
),
],
),
),
SizedBox(height: 118.rpx),
Padding(
padding: EdgeInsets.only(
left: 47.rpx), // 👈 控制间隔大小(也可以是 all / symmetric
child: Align(
alignment: Alignment.centerLeft,
child: Text(
'按摩定时',
style: TextStyle(
color: Colors.white70, fontSize: 30.rpx),
),
),
),
SizedBox(height: 74.rpx),
Padding(
padding: EdgeInsets.fromLTRB(40.rpx, 0, 40.rpx, 0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children:
List.generate(timeOptions.length, (index) {
final min = timeOptions[index];
final isSelected = selectedTime == min;
return SizedBox(
height: buttonHeight,
child: ElevatedButton(
onPressed: () {
setState(() {
selectedTime = min;
});
},
style: ElevatedButton.styleFrom(
backgroundColor: isSelected
? Colors.cyanAccent
: Colors.blue.shade900,
foregroundColor: isSelected
? Colors.black
: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),
),
),
child: Text('$min分钟'),
));
}),
)),
],
)),
Padding(
padding: EdgeInsets.fromLTRB(30.rpx, 0, 30.rpx,
81.rpx), // 👈 控制上方间隔(也可以用 all / symmetric
child: OutlinedButton(
onPressed: () {
setState(() {
intensity = 4;
selectedTime = 10;
});
},
style: OutlinedButton.styleFrom(
side: const BorderSide(color: Color(0XFF74DAE5)),
foregroundColor: Colors.cyanAccent,
minimumSize: Size(bodysize.maxWidth, 92.rpx),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),
),
),
child: const Text('恢复到默认设置'),
],
),
),
SizedBox(height: 118.rpx),
Padding(
padding: EdgeInsets.only(
left: 47.rpx), // 👈 控制间隔大小(也可以是 all / symmetric
child: Align(
alignment: Alignment.centerLeft,
child: Text(
'按摩定时',
style:
TextStyle(color: Colors.white70, fontSize: 30.rpx),
),
),
),
SizedBox(height: 74.rpx),
Padding(
padding: EdgeInsets.fromLTRB(40.rpx, 0, 40.rpx, 0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: List.generate(timeOptions.length, (index) {
final min = timeOptions[index];
final isSelected = selectedTime == min;
return SizedBox(
height: buttonHeight,
child: ElevatedButton(
onPressed: () {
setState(() {
selectedTime = min;
});
},
style: ElevatedButton.styleFrom(
backgroundColor: isSelected
? Colors.cyanAccent
: Colors.blue.shade900,
foregroundColor:
isSelected ? Colors.black : Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),
),
),
child: Text('$min分钟'),
));
}),
)),
],
)),
Padding(
padding: EdgeInsets.fromLTRB(30.rpx, 0, 30.rpx,
81.rpx), // 👈 控制上方间隔(也可以用 all / symmetric
child: OutlinedButton(
onPressed: () {
setState(() {
intensity = 4;
selectedTime = 10;
});
},
style: OutlinedButton.styleFrom(
side: const BorderSide(color: Color(0XFF74DAE5)),
foregroundColor: Colors.cyanAccent,
minimumSize: Size(bodysize.maxWidth, 92.rpx),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),
),
),
child: const Text('恢复到默认设置'),
),
),
),
)));
],
),
),
)));
});
}
}

View File

@@ -5,7 +5,6 @@ import 'package:flutter/material.dart';
import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart';
class HomeDeviceType extends StatefulWidget {
HomeDeviceType({super.key});
@override
@@ -25,85 +24,85 @@ class _HomeDeviceTypeState extends State<HomeDeviceType> {
// }
return LayoutBuilder(
builder: (context, boxConstraints) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: const IconThemeData(color: Colors.white),
titleSpacing: 0,
// leading: returnIconButtom,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'添加设备',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
centerTitle: false,
),
body: SafeArea(
top: true,
child: Container(
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height * 1.123,
// decoration: const BoxDecoration(
// image: DecorationImage(
// image: AssetImage("assets/images/new_background.png"),
// fit: BoxFit.cover,
// ),
// ),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
48.rpx, 24.rpx, 0, 0),
child: Text(
'选择类型',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 30.rpx,
letterSpacing: 0,
),
),
),
_buildControlCard(context),
],
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: const IconThemeData(color: Colors.white),
titleSpacing: 0,
// leading: returnIconButtom,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'添加设备',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
centerTitle: false,
),
body: SafeArea(
top: true,
child: Container(
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height * 1.123,
// decoration: const BoxDecoration(
// image: DecorationImage(
// image: AssetImage("assets/images/new_background.png"),
// fit: BoxFit.cover,
// ),
// ),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding:
EdgeInsetsDirectional.fromSTEB(48.rpx, 24.rpx, 0, 0),
child: Text(
'选择类型',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 30.rpx,
letterSpacing: 0,
),
),
),
_buildControlCard(context),
],
),
),
),
)),
),
),
)),
);
}
}

View File

@@ -20,7 +20,7 @@ class _MattressControlPageState extends State<MattressControlPage> {
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
// onTap: () => FocusScope.of(context).unfocus(),
// // onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(

View File

@@ -23,7 +23,7 @@ class ShareDeviceDetailWidget extends GetView {
type.value = shareInfo['op_type'];
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Scaffold(
key: scaffoldKey,
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,

View File

@@ -44,7 +44,7 @@ class _MhAboutUsPageState extends State<MhAboutUsPage> {
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(

View File

@@ -24,186 +24,185 @@ class AddressListPage extends GetView<AddressListController> {
return LayoutBuilder(builder: (context, cc) {
bodysize = cc;
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'地址管理',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'地址管理',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
centerTitle: false,
),
body: Container(
margin: EdgeInsets.only(top: 30.rpx),
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 1,
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
// Obx(() {
// if (controller.model.addressList!.isEmpty) {
// // 如果地址列表为空,显示 EmptyMessageWidget
// return Expanded(child: NullDataWidget());
// } else {
// // 如果地址列表不为空,显示地址列表
// return Expanded(
// child: Container(
// width: bodysize!.maxWidth,
// height: bodysize!.maxHeight * 1,
// decoration: BoxDecoration(),
// child: Obx(() => ListView(
// shrinkWrap: true,
// scrollDirection: Axis.vertical,
// children: (controller.model.addressList!
// .asMap()
// .entries
// .map((e) => AddressModuleWidget(
// index: e.key,
// addressListController:
// controller,
// ))
// .toList() as List<Widget>)
// .divide(const SizedBox(height: 10))
// .addToEnd(const SizedBox(
// height:
// AppConstants.list_end_height)),
// )),
// ),
// );
// }
// }),
Obx(() {
final originList = controller.model.addressList ?? [];
// 拆出默认地址
final defaultItem = originList.firstWhere(
(e) => e["default"] == 1,
orElse: () => null,
);
// 其他非默认地址
final others =
originList.where((e) => e["default"] != 1).toList();
// 新的展示顺序列表(默认地址排前面)
final reorderedList = [
if (defaultItem != null) defaultItem,
...others,
];
return Expanded(
child: ListView(
shrinkWrap: true,
padding: EdgeInsets.zero,
children: reorderedList
.map((item) {
final realIndex =
originList.indexOf(item); // 保留原始 index
return AddressModuleWidget(
index: realIndex,
addressListController: controller,
);
})
.toList()
.divide(const SizedBox(height: 10))
.addToEnd(const SizedBox(
height: AppConstants.list_end_height)),
),
);
}),
Align(
alignment: AlignmentDirectional(0, 1),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
15, 15, 15, AppConstants.page_button_bottom_padding),
child: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 0.056,
decoration: BoxDecoration(
// color: Color(0xFFF6F6F6),
border: Border.all(width: 0, color: Color(0XFF85F5FF)),
borderRadius: BorderRadius.circular(12),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
centerTitle: false,
),
body: Container(
margin: EdgeInsets.only(top: 30.rpx),
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 1,
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
// Obx(() {
// if (controller.model.addressList!.isEmpty) {
// // 如果地址列表为空,显示 EmptyMessageWidget
// return Expanded(child: NullDataWidget());
// } else {
// // 如果地址列表不为空,显示地址列表
// return Expanded(
// child: Container(
// width: bodysize!.maxWidth,
// height: bodysize!.maxHeight * 1,
// decoration: BoxDecoration(),
// child: Obx(() => ListView(
// shrinkWrap: true,
// scrollDirection: Axis.vertical,
// children: (controller.model.addressList!
// .asMap()
// .entries
// .map((e) => AddressModuleWidget(
// index: e.key,
// addressListController:
// controller,
// ))
// .toList() as List<Widget>)
// .divide(const SizedBox(height: 10))
// .addToEnd(const SizedBox(
// height:
// AppConstants.list_end_height)),
// )),
// ),
// );
// }
// }),
Obx(() {
final originList = controller.model.addressList ?? [];
// 拆出默认地址
final defaultItem = originList.firstWhere(
(e) => e["default"] == 1,
orElse: () => null,
);
// 其他非默认地址
final others =
originList.where((e) => e["default"] != 1).toList();
// 新的展示顺序列表(默认地址排前面)
final reorderedList = [
if (defaultItem != null) defaultItem,
...others,
];
return Expanded(
child: ListView(
shrinkWrap: true,
padding: EdgeInsets.zero,
children: reorderedList
.map((item) {
final realIndex =
originList.indexOf(item); // 保留原始 index
return AddressModuleWidget(
index: realIndex,
addressListController: controller,
);
})
.toList()
.divide(const SizedBox(height: 10))
.addToEnd(const SizedBox(
height: AppConstants.list_end_height)),
),
);
}),
Align(
alignment: AlignmentDirectional(0, 1),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(15, 15, 15,
AppConstants.page_button_bottom_padding),
child: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 0.056,
decoration: BoxDecoration(
// color: Color(0xFFF6F6F6),
border:
Border.all(width: 0, color: Color(0XFF85F5FF)),
borderRadius: BorderRadius.circular(12),
child: TextButton(
onPressed: () {
controller.model.address = {'default': 0};
controller.model.type = 1;
Get.toNamed("/editAddressPage");
},
style: TextButton.styleFrom(
backgroundColor: Colors.transparent,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
child: TextButton(
onPressed: () {
controller.model.address = {'default': 0};
controller.model.type = 1;
Get.toNamed("/editAddressPage");
},
style: TextButton.styleFrom(
backgroundColor: Colors.transparent,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
padding:
EdgeInsets.symmetric(horizontal: 24), // 按钮内边距
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Baseline(
// baselineType: TextBaseline.alphabetic,
// baseline: AppFontsize.normal_text_size *
// 1.6, // 调整基线位置
SvgPicture.asset(
'assets/img/icon/plus.svg',
width: 42.rpx,
height: 42.rpx,
),
SizedBox(width: 10), // 加号和文字间距
Text(
'添加新地址',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF85F5FF),
fontSize: AppFontsize.normal_text_size,
letterSpacing: 0,
),
padding:
EdgeInsets.symmetric(horizontal: 24), // 按钮内边距
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Baseline(
// baselineType: TextBaseline.alphabetic,
// baseline: AppFontsize.normal_text_size *
// 1.6, // 调整基线位置
SvgPicture.asset(
'assets/img/icon/plus.svg',
width: 42.rpx,
height: 42.rpx,
),
SizedBox(width: 10), // 加号和文字间距
Text(
'添加新地址',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF85F5FF),
fontSize: AppFontsize.normal_text_size,
letterSpacing: 0,
),
),
],
),
),
],
),
),
),
],
),
),
),
],
),
));
),
),
));
});
}
}

View File

@@ -33,7 +33,7 @@ class _ApplyRepairSuccessState extends State<ApplyRepairSuccess> {
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(

File diff suppressed because it is too large Load Diff

View File

@@ -67,7 +67,7 @@ class _BluetoothPageState extends State<BluetoothPage> {
bodysize = cc;
final isBind = obsData['bind_type'] == 1;
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(

View File

@@ -29,7 +29,7 @@ class BookInfoPage extends GetView<BookInfoController> {
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(

View File

@@ -24,203 +24,202 @@ class BookSuccessPage extends GetView {
return LayoutBuilder(builder: (context, cc) {
bodysize = cc;
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
// key: scaffoldKey,
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
// leading: returnIconButtomAddCallback(() {
// controller.saveDataApi();
// updateParm(isShowToast: false);
// }),
// leading: returnIconButtomNew,
title: Container(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'我要预约',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
child: Scaffold(
// key: scaffoldKey,
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
// leading: returnIconButtomAddCallback(() {
// controller.saveDataApi();
// updateParm(isShowToast: false);
// }),
// leading: returnIconButtomNew,
title: Container(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
actions: [],
centerTitle: false,
),
body: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 1,
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: bodysize!.maxWidth,
margin: EdgeInsets.only(top: 90.rpx),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
// 中间居中的标题
Text(
'我要预约',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
Container(
width: 148.rpx,
height: 148.rpx,
clipBehavior: Clip.antiAlias,
decoration: const BoxDecoration(
shape: BoxShape.circle,
),
child: Image.asset(
'assets/images/success.png',
fit: BoxFit.contain,
color: Color(0xFF84F5FF),
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
Align(
alignment: const AlignmentDirectional(0, 0),
child: Text(
'预约成功!',
style: TextStyle(
fontFamily: 'Readex Pro',
fontSize: 30.rpx,
color: Colors.white,
letterSpacing: 0,
fontWeight: FontWeight.w600,
),
),
),
],
].divide(SizedBox(height: 30.rpx)),
),
),
actions: [],
centerTitle: false,
),
body: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 1,
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: bodysize!.maxWidth,
margin: EdgeInsets.only(top: 90.rpx),
Container(
margin:
EdgeInsets.only(left: 30.rpx, right: 30.rpx, top: 55.rpx),
width: bodysize!.maxWidth,
decoration: BoxDecoration(
color: Color(0xFF003058),
borderRadius: BorderRadius.circular(16.rpx),
),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: 148.rpx,
height: 148.rpx,
clipBehavior: Clip.antiAlias,
decoration: const BoxDecoration(
shape: BoxShape.circle,
),
child: Image.asset(
'assets/images/success.png',
fit: BoxFit.contain,
color: Color(0xFF84F5FF),
),
),
Align(
alignment: const AlignmentDirectional(0, 0),
child: Text(
'预约成功!',
style: TextStyle(
fontFamily: 'Readex Pro',
fontSize: 30.rpx,
color: Colors.white,
letterSpacing: 0,
fontWeight: FontWeight.w600,
),
),
),
].divide(SizedBox(height: 30.rpx)),
),
),
Container(
margin: EdgeInsets.only(
left: 30.rpx, right: 30.rpx, top: 55.rpx),
width: bodysize!.maxWidth,
decoration: BoxDecoration(
color: Color(0xFF003058),
borderRadius: BorderRadius.circular(16.rpx),
),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 20), // 上间距
for (var item in infoList)
Container(
height: 60.rpx,
padding:
EdgeInsets.symmetric(horizontal: 35.rpx),
alignment: Alignment.centerLeft,
child: Row(
children: [
Text(
item['label']!,
style: TextStyle(
color: Color(0XFF929699),
fontSize: 26.rpx,
),
),
SizedBox(width: 30.rpx),
Text(
item['value']!,
style: TextStyle(
color: Colors.white,
fontSize: 26.rpx,
),
),
],
)),
SizedBox(height: 60.rpx), // 空间隔断
Padding(
padding: EdgeInsets.symmetric(horizontal: 35),
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 20), // 上间距
for (var item in infoList)
Container(
height: 60.rpx,
padding: EdgeInsets.symmetric(horizontal: 35.rpx),
alignment: Alignment.centerLeft,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: 200.rpx,
height: 60.rpx,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFF84F5FF),
padding: EdgeInsets.zero, // 去除文字内边距
tapTargetSize: MaterialTapTargetSize
.shrinkWrap, // 去除额外点击区域
// shape:
// RoundedRectangleBorder(), // 可选:去除默认圆角
),
onPressed: () {},
child: Center(
// 保证文字居中
child: Text(
"关闭",
style: TextStyle(
color: Color(0XFF011D33),
fontSize: 26.rpx,
),
),
),
)),
SizedBox(width: 60.rpx),
SizedBox(
width: 200.rpx,
height: 60.rpx,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFF84F5FF),
padding: EdgeInsets.zero, // 去除文字内边距
tapTargetSize: MaterialTapTargetSize
.shrinkWrap, // 去除额外点击区域
// shape:
// RoundedRectangleBorder(), // 可选:去除默认圆角
),
onPressed: () {},
child: Center(
// 保证文字居中
child: Text(
"我的预约",
style: TextStyle(
color: Color(0XFF011D33),
fontSize: 26.rpx,
),
),
),
))
Text(
item['label']!,
style: TextStyle(
color: Color(0XFF929699),
fontSize: 26.rpx,
),
),
SizedBox(width: 30.rpx),
Text(
item['value']!,
style: TextStyle(
color: Colors.white,
fontSize: 26.rpx,
),
),
],
),
),
)),
SizedBox(height: 80.rpx), // 下间距
],
)),
),
],
SizedBox(height: 60.rpx), // 空间隔断
Padding(
padding: EdgeInsets.symmetric(horizontal: 35),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: 200.rpx,
height: 60.rpx,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFF84F5FF),
padding: EdgeInsets.zero, // 去除文字内边距
tapTargetSize: MaterialTapTargetSize
.shrinkWrap, // 去除额外点击区域
// shape:
// RoundedRectangleBorder(), // 可选:去除默认圆角
),
onPressed: () {},
child: Center(
// 保证文字居中
child: Text(
"关闭",
style: TextStyle(
color: Color(0XFF011D33),
fontSize: 26.rpx,
),
),
),
)),
SizedBox(width: 60.rpx),
SizedBox(
width: 200.rpx,
height: 60.rpx,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFF84F5FF),
padding: EdgeInsets.zero, // 去除文字内边距
tapTargetSize: MaterialTapTargetSize
.shrinkWrap, // 去除额外点击区域
// shape:
// RoundedRectangleBorder(), // 可选:去除默认圆角
),
onPressed: () {},
child: Center(
// 保证文字居中
child: Text(
"我的预约",
style: TextStyle(
color: Color(0XFF011D33),
fontSize: 26.rpx,
),
),
),
))
],
),
),
SizedBox(height: 80.rpx), // 下间距
],
)),
),
),
],
),
));
),
),
));
});
}
}

View File

@@ -18,305 +18,296 @@ class DeletedAccountPage extends GetView {
bodysize = cc;
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: const IconThemeData(color: Colors.white),
titleSpacing: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'注销账号',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
child: Scaffold(
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: const IconThemeData(color: Colors.white),
titleSpacing: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'注销账号',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
centerTitle: false,
),
key: scaffoldKey,
backgroundColor: Colors.transparent,
body: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 1,
decoration: const BoxDecoration(),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Expanded(
child: Container(
width: MediaQuery.sizeOf(context).width,
height: 100,
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Padding(
centerTitle: false,
),
key: scaffoldKey,
backgroundColor: Colors.transparent,
body: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 1,
decoration: const BoxDecoration(),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Expanded(
child: Container(
width: MediaQuery.sizeOf(context).width,
height: 100,
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
15, 33, 15, 0),
child: Container(
width: MediaQuery.sizeOf(context).width,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
),
child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
15, 33, 15, 0),
21, 0, 22, 0),
child: Container(
width: MediaQuery.sizeOf(context).width,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
),
child: Padding(
padding:
const EdgeInsetsDirectional.fromSTEB(
21, 0, 22, 0),
child: Container(
width: MediaQuery.sizeOf(context).width,
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Container(
width: 50,
height: 50,
child: Image.asset(
'assets/images/delete_account.png',
fit: BoxFit.cover,
color: Color(0XFF84F5FF),
),
),
const Text(
"注销智慧眠花糖账号",
style: TextStyle(
fontSize: 20, // 设置字体大小
color: Color(0xFFFFFFFF),
// decoration: TextDecoration.underline, // 添加下划线
),
),
Container(
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.center,
CrossAxisAlignment.start,
children: [
Container(
width: 50,
height: 50,
child: Image.asset(
'assets/images/delete_account.png',
fit: BoxFit.cover,
color: Color(0XFF84F5FF),
),
),
const Text(
"注销智慧眠花糖账号",
style: TextStyle(
fontSize: 20, // 设置字体大小
color: Color(0xFFFFFFFF),
// decoration: TextDecoration.underline, // 添加下划线
),
),
Container(
child: Column(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
RichText(
text: TextSpan(
text: "账号注销后,你将无法使用以下功能,",
RichText(
text: TextSpan(
text: "账号注销后,你将无法使用以下功能,",
style: TextStyle(
fontSize: AppFontsize
.normal_text_size, // 设置字体大小
color:
Color(0xFF9AA0B3), // 默认颜色
),
children: [
TextSpan(
text:
"并且当前有绑定以及被分享的智能床、智能床垫等设备的账号不能注销",
style: TextStyle(
fontSize: AppFontsize
.normal_text_size, // 设置字体大小
color: Color(
0xFF9AA0B3), // 默认颜色
.normal_text_size,
color: const Color(
0xFFFF7159), // 设置为#E45E91的颜色
),
children: [
TextSpan(
text:
"并且当前有绑定以及被分享的智能床、智能床垫等设备的账号不能注销",
style: TextStyle(
fontSize: AppFontsize
.normal_text_size,
color: const Color(
0xFFFF7159), // 设置为#E45E91的颜色
),
),
TextSpan(
text:
",可先进行解绑后再进行注销操作。",
style: TextStyle(
fontSize: AppFontsize
.normal_text_size,
color:
Color(0xFF9AA0B3),
),
),
],
),
),
const SizedBox(
height: 24,
),
Text(
"无法控制智能床、智能床垫等设备",
style: TextStyle(
fontSize: AppFontsize
.title_size, // 设置字体大小
color:
const Color(0xFFFFFFFF),
TextSpan(
text: ",可先进行解绑后再进行注销操作。",
style: TextStyle(
fontSize: AppFontsize
.normal_text_size,
color: Color(0xFF9AA0B3),
),
),
),
const SizedBox(
height: 6,
),
Text(
"你将无法控制你的智能床、智能床垫等设备,以及与其相关的各种操作。",
style: TextStyle(
fontSize: AppFontsize
.normal_text_size, // 设置字体大小
color: Color(0xFF9AA0B3),
),
),
const SizedBox(
height: 24,
),
Text(
"无法查询睡眠报告和体征数据",
style: TextStyle(
fontSize: AppFontsize
.title_size, // 设置字体大小
color:
const Color(0xFFFFFFFF),
),
),
const SizedBox(
height: 6,
),
Text(
"注销账号后你将查询不到你以前的睡眠报告和实时数据。",
style: TextStyle(
fontSize: AppFontsize
.normal_text_size, // 设置字体大小
color: Color(0xFF9AA0B3),
),
),
const SizedBox(
height: 24,
),
Text(
"无法使用的其他功能",
style: TextStyle(
fontSize: AppFontsize
.title_size, // 设置字体大小
color:
const Color(0xFFFFFFFF),
),
),
const SizedBox(
height: 6,
),
Text(
"包含设备报修、门店体验预约等。",
style: TextStyle(
fontSize: AppFontsize
.normal_text_size, // 设置字体大小
color: Color(0xFF9AA0B3),
),
),
],
)),
]
.divide(
const SizedBox(height: 24))
.addToStart(
const SizedBox(height: 14))
.addToEnd(
const SizedBox(height: 17)),
),
),
],
),
),
const SizedBox(
height: 24,
),
Text(
"无法控制智能床、智能床垫等设备",
style: TextStyle(
fontSize: AppFontsize
.title_size, // 设置字体大小
color: const Color(0xFFFFFFFF),
),
),
const SizedBox(
height: 6,
),
Text(
"你将无法控制你的智能床、智能床垫等设备,以及与其相关的各种操作。",
style: TextStyle(
fontSize: AppFontsize
.normal_text_size, // 设置字体大小
color: Color(0xFF9AA0B3),
),
),
const SizedBox(
height: 24,
),
Text(
"无法查询睡眠报告和体征数据",
style: TextStyle(
fontSize: AppFontsize
.title_size, // 设置字体大小
color: const Color(0xFFFFFFFF),
),
),
const SizedBox(
height: 6,
),
Text(
"注销账号后你将查询不到你以前的睡眠报告和实时数据。",
style: TextStyle(
fontSize: AppFontsize
.normal_text_size, // 设置字体大小
color: Color(0xFF9AA0B3),
),
),
const SizedBox(
height: 24,
),
Text(
"无法使用的其他功能",
style: TextStyle(
fontSize: AppFontsize
.title_size, // 设置字体大小
color: const Color(0xFFFFFFFF),
),
),
const SizedBox(
height: 6,
),
Text(
"包含设备报修、门店体验预约等。",
style: TextStyle(
fontSize: AppFontsize
.normal_text_size, // 设置字体大小
color: Color(0xFF9AA0B3),
),
),
],
)),
]
.divide(const SizedBox(height: 24))
.addToStart(
const SizedBox(height: 14))
.addToEnd(const SizedBox(height: 17)),
),
),
),
),
],
),
),
),
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
15, 0, 15, AppConstants.page_button_bottom_padding),
child: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 0.056,
// decoration: BoxDecoration(
// color:
// FlutterFlowTheme.of(context).secondaryBackground,
// ),
child: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 0.056,
decoration: BoxDecoration(
// color: FlutterFlowTheme.of(context)
// .secondaryBackground,
borderRadius: BorderRadius.circular(12),
),
child: FFButtonWidget(
onPressed: () async {
// showCustomConfirmDialog(context, "是否确认注销?")
// .then((v) async {
// if (v != "confirm") {
// return;
// }
// LoginController loginController = Get.find();
// UserInfoController userInfoController =
// Get.find<UserInfoController>();
// var code = await loginController.deletedAccount();
// if (code != null && code == 1) {
// final box = GetStorage();
// box.remove('user');
// box.remove('token');
// userInfoController.model.token = null;
// userInfoController.model.user = null;
// userInfoController.model.login = 0;
// userInfoController.model.message = 0;
// GlobalController globalController =
// Get.find<GlobalController>();
// globalController.resetParmAll();
// Get.offAllNamed("/loginPage");
// }
// });
},
text: '注销账号',
options: FFButtonOptions(
height: 40,
padding: const EdgeInsetsDirectional.fromSTEB(
24, 0, 24, 0),
iconPadding: const EdgeInsetsDirectional.fromSTEB(
0, 0, 0, 0),
color: const Color(0xFFFF7159),
textStyle: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: AppFontsize.normal_text_size,
letterSpacing: 0,
),
elevation: 0,
borderSide: const BorderSide(
color: Colors.transparent,
width: 1,
),
borderRadius: BorderRadius.circular(8),
),
),
],
),
),
),
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
15, 0, 15, AppConstants.page_button_bottom_padding),
child: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 0.056,
// decoration: BoxDecoration(
// color:
// FlutterFlowTheme.of(context).secondaryBackground,
// ),
child: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 0.056,
decoration: BoxDecoration(
// color: FlutterFlowTheme.of(context)
// .secondaryBackground,
borderRadius: BorderRadius.circular(12),
),
child: FFButtonWidget(
onPressed: () async {
// showCustomConfirmDialog(context, "是否确认注销?")
// .then((v) async {
// if (v != "confirm") {
// return;
// }
// LoginController loginController = Get.find();
// UserInfoController userInfoController =
// Get.find<UserInfoController>();
// var code = await loginController.deletedAccount();
// if (code != null && code == 1) {
// final box = GetStorage();
// box.remove('user');
// box.remove('token');
// userInfoController.model.token = null;
// userInfoController.model.user = null;
// userInfoController.model.login = 0;
// userInfoController.model.message = 0;
// GlobalController globalController =
// Get.find<GlobalController>();
// globalController.resetParmAll();
// Get.offAllNamed("/loginPage");
// }
// });
},
text: '注销账号',
options: FFButtonOptions(
height: 40,
padding: const EdgeInsetsDirectional.fromSTEB(
24, 0, 24, 0),
iconPadding:
const EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0),
color: const Color(0xFFFF7159),
textStyle: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: AppFontsize.normal_text_size,
letterSpacing: 0,
),
elevation: 0,
borderSide: const BorderSide(
color: Colors.transparent,
width: 1,
),
borderRadius: BorderRadius.circular(8),
),
),
),
],
),
),
),
],
),
));
),
),
));
});
}

View File

@@ -41,7 +41,7 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
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(

View File

@@ -50,7 +50,7 @@ class _MHTBindDeviceTypePageState extends State<MHTBindDeviceTypePage> {
}
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(

View File

@@ -209,7 +209,7 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
ef.log("$e");
} finally {
setState(() {
isScanning = false;
isScanning = false;
});
}
}
@@ -287,7 +287,7 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, boxConstraints) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(

View File

@@ -64,7 +64,7 @@ class _MHTCalibrationPageCopyState extends State<MHTCalibrationPageCopy> {
return WillPopScope(
child: LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(

View File

@@ -73,7 +73,7 @@ class _MHTCalibrationPageState extends State<MHTCalibrationPage> {
return WillPopScope(
child: LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(

View File

@@ -108,7 +108,8 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
// 导航到下一页
if (blueteethBindController.wifiStatus.value != 1) {
showConfirmDialog(context, Container(), "未配置网络提示".tr, onConfirm: () async {
showConfirmDialog(context, Container(), "未配置网络提示".tr,
onConfirm: () async {
_cleanupResources();
await _disconnectDevice();
Get.toNamed("/calibrationPage");
@@ -124,7 +125,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
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(
@@ -1104,7 +1105,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
);
}
Future<void> _disconnectDevice() async {
Future<void> _disconnectDevice() async {
try {
THapp bledevice = THapp(device: widget.deviceInfo.scanResult.device);
await bledevice.disconnect();

View File

@@ -33,107 +33,107 @@ class _DeviceListPageState extends State<DeviceListPage> {
return LayoutBuilder(builder: (context, cc) {
bodysize = cc;
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
// leading: returnIconButtomAddCallback(() {
// controller.saveDataApi();
// updateParm(isShowToast: false);
// }),
// leading: returnIconButtomNew,
title: Container(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'设备列表',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
actions: [],
centerTitle: false,
),
child: Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
// leading: returnIconButtomAddCallback(() {
// controller.saveDataApi();
// updateParm(isShowToast: false);
// }),
// leading: returnIconButtomNew,
title: Container(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'设备列表',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
backgroundColor: Colors.transparent,
body: Container(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Padding(
padding: EdgeInsetsDirectional.fromSTEB(0, 10, 0, 23),
child: SearchWidget(
keyword: controller.model.keyword,
color: controller.model.color,
hint: "检索设备",
onChange: (d) {
controller.model.keyword = d;
},
findCallback: () {
controller.getDeviceList();
},
),
),
Obx(() {
if (controller.model.deviceList == null ||
controller.model.deviceList.isEmpty) {
return Expanded(child: NullDataWidget());
}
actions: [],
centerTitle: false,
),
backgroundColor: Colors.transparent,
body: Container(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Padding(
padding: EdgeInsetsDirectional.fromSTEB(0, 10, 0, 23),
child: SearchWidget(
keyword: controller.model.keyword,
color: controller.model.color,
hint: "检索设备",
onChange: (d) {
controller.model.keyword = d;
},
findCallback: () {
controller.getDeviceList();
},
),
// 如果 deviceList 不为空,渲染列表
return Expanded(
child: ListView(
shrinkWrap: true,
scrollDirection: Axis.vertical,
children: controller.model.deviceList
.asMap()
.entries
.map((e) => DeviceInfoWidget(
index: e.key,
deviceListController: controller,
))
.toList()
.divide(const SizedBox(height: 10))
.addToEnd(const SizedBox(height: 100)),
),
Obx(() {
if (controller.model.deviceList == null ||
controller.model.deviceList.isEmpty) {
return Expanded(child: NullDataWidget());
}
);
}),
],
),
)
// 如果 deviceList 不为空,渲染列表
return Expanded(
child: ListView(
shrinkWrap: true,
scrollDirection: Axis.vertical,
children: controller.model.deviceList
.asMap()
.entries
.map((e) => DeviceInfoWidget(
index: e.key,
deviceListController: controller,
))
.toList()
.divide(const SizedBox(height: 10))
.addToEnd(const SizedBox(height: 100)),
),
);
}),
],
),
)
// Container(
// width: bodysize!.maxWidth,
// height: bodysize!.maxHeight,
// Container(
// width: bodysize!.maxWidth,
// height: bodysize!.maxHeight,
// ),
),
));
// ),
),
));
});
}
}

View File

@@ -36,177 +36,176 @@ class DevicePeopleInfo extends GetView<PeopleInfoController> {
@override
Widget build(BuildContext context) {
WidgetsBinding.instance.addPostFrameCallback((_) {
controller.getPeoples (data['mac']);
controller.getPeoples(data['mac']);
});
return LayoutBuilder(
builder: (context, boxConstraints) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
title: AppBar(
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
title: AppBar(
backgroundColor: Colors.transparent,
iconTheme: const IconThemeData(color: Colors.white),
automaticallyImplyLeading: false,
titleSpacing: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'详情',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
centerTitle: false,
),
actions: [],
centerTitle: false,
),
body: SafeArea(
top: true,
child: Obx(
() => Container(
padding: EdgeInsets.only(
left: 30.rpx, right: 30.rpx, top: 30.rpx),
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height * 1.123,
// decoration: BoxDecoration(
// // color: AppColors.bg_color,
// image: DecorationImage(
// image: AssetImage("assets/images/background.png"),
// fit: BoxFit.cover,
// ),
// ),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
ClickableContainer(
backgroundColor: Color(0xFFFF036060),
highlightColor: Colors.transparent,
borderRadius: 16.rpx,
padding: EdgeInsets.fromLTRB(
30.rpx, 20.rpx, 0, 20.rpx),
onTap: () {},
child: Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(16.rpx)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
alignment: Alignment.centerLeft,
child: Text(
'设备信息',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 30.rpx,
),
),
),
getInfoRow(
context, "名称:${data["name"] ?? "-"}"),
getInfoRow(context,
"房间:${data["roomName"] ?? "-"}"),
getInfoRow(
context,
"设备状态:${data["status"]?["status"] == 1 ? "已绑定" : data["status"]?["status"] == 0 ? "已绑定" : "-"}",
),
getInfoRow(
context, "MAC${data["mac"] ?? "-"}"),
],
),
)),
if (controller.model.peopleList.isNotEmpty)
...List.generate(controller.model.peopleList.length,
(index) {
final person = controller.model.peopleList[index];
// String location_ = '';
// if ("${data["bindMacB"]}".length > 6 &&
// (person["direction"] == 1 ||
// person["direction"] == 2)) {
// location_ =
// person["direction"] == 1 ? '左侧' : '右侧';
// }
return ClickableContainer(
backgroundColor: Color(0xFF003058),
highlightColor: Color(0xFF036060),
borderRadius: 16.rpx,
padding: EdgeInsets.fromLTRB(
30.rpx, 20.rpx, 30.rpx, 20.rpx),
onTap: () {},
child: Column(
children: [
Container(
width: double.infinity,
alignment: Alignment.centerLeft,
child: Text(
'人员资料${index == 0 ? "A" : "B"}',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 32.rpx,
letterSpacing: 0,
),
),
),
getInfoRow(
context, "姓名:${person["name"] ?? "-"}"),
getInfoRow(context,
"性别:${person["gender"] == null ? "-" : (person["gender"] == 1 ? "" : "")}"),
getInfoRow(context,
"身高:${person["height"] == null ? "-" : "${person["height"]}cm"}"),
getInfoRow(context,
"体重:${person["weight"] == null ? "-" : "${person["weight"]}kg"}"),
getInfoRow(context,
"生日:${person["birthday"] == null ? "-" : time_08_Formatter_pattern(person["birthday"], "yyyy年MM月dd日")}"),
getInfoRow(
context, "电话:${person["tel"] ?? "-"}"),
getInfoRow(context,
"紧急联系人:${person["contact"] ?? "-"}"),
],
),
);
})
].divide(SizedBox(
height: 25.rpx,
)),
iconTheme: const IconThemeData(color: Colors.white),
automaticallyImplyLeading: false,
titleSpacing: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'详情',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
centerTitle: false,
),
actions: [],
centerTitle: false,
),
body: SafeArea(
top: true,
child: Obx(
() => Container(
padding:
EdgeInsets.only(left: 30.rpx, right: 30.rpx, top: 30.rpx),
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height * 1.123,
// decoration: BoxDecoration(
// // color: AppColors.bg_color,
// image: DecorationImage(
// image: AssetImage("assets/images/background.png"),
// fit: BoxFit.cover,
// ),
// ),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
ClickableContainer(
backgroundColor: Color(0xFFFF036060),
highlightColor: Colors.transparent,
borderRadius: 16.rpx,
padding:
EdgeInsets.fromLTRB(30.rpx, 20.rpx, 0, 20.rpx),
onTap: () {},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16.rpx)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
alignment: Alignment.centerLeft,
child: Text(
'设备信息',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 30.rpx,
),
),
),
getInfoRow(
context, "名称:${data["name"] ?? "-"}"),
getInfoRow(
context, "房间:${data["roomName"] ?? "-"}"),
getInfoRow(
context,
"设备状态:${data["status"]?["status"] == 1 ? "已绑定" : data["status"]?["status"] == 0 ? "已绑定" : "-"}",
),
getInfoRow(
context, "MAC${data["mac"] ?? "-"}"),
],
),
)),
if (controller.model.peopleList.isNotEmpty)
...List.generate(controller.model.peopleList.length,
(index) {
final person = controller.model.peopleList[index];
// String location_ = '';
// if ("${data["bindMacB"]}".length > 6 &&
// (person["direction"] == 1 ||
// person["direction"] == 2)) {
// location_ =
// person["direction"] == 1 ? '左侧' : '右侧';
// }
return ClickableContainer(
backgroundColor: Color(0xFF003058),
highlightColor: Color(0xFF036060),
borderRadius: 16.rpx,
padding: EdgeInsets.fromLTRB(
30.rpx, 20.rpx, 30.rpx, 20.rpx),
onTap: () {},
child: Column(
children: [
Container(
width: double.infinity,
alignment: Alignment.centerLeft,
child: Text(
'人员资料${index == 0 ? "A" : "B"}',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 32.rpx,
letterSpacing: 0,
),
),
),
getInfoRow(
context, "姓名:${person["name"] ?? "-"}"),
getInfoRow(context,
"性别:${person["gender"] == null ? "-" : (person["gender"] == 1 ? "" : "")}"),
getInfoRow(context,
"身高:${person["height"] == null ? "-" : "${person["height"]}cm"}"),
getInfoRow(context,
"体重:${person["weight"] == null ? "-" : "${person["weight"]}kg"}"),
getInfoRow(context,
"生日:${person["birthday"] == null ? "-" : time_08_Formatter_pattern(person["birthday"], "yyyy年MM月dd日")}"),
getInfoRow(
context, "电话:${person["tel"] ?? "-"}"),
getInfoRow(context,
"紧急联系人:${person["contact"] ?? "-"}"),
],
),
);
})
].divide(SizedBox(
height: 25.rpx,
)),
),
),
),
),
)),
),
),
)),
);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -47,7 +47,7 @@ class EditAddressPage extends GetView<AddressController>
return LayoutBuilder(builder: (context, cc) {
bodysize = cc;
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(

View File

@@ -62,133 +62,130 @@ class _ExperienceStorePageState extends State<ExperienceStorePage> {
bodysize = cc;
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
// key: scaffoldKey,
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'预约体验',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
Positioned(
right: 30.rpx,
child: ClickableContainer(
backgroundColor: Colors.transparent,
highlightColor: Color(0xFF055466),
padding: EdgeInsets.only(left: 0),
onTap: () {
TopSlideNotification.show(context,
text: "待开发功能".tr);
// Get.toNamed("/myExperiencePage");
},
child: SvgPicture.asset(
'assets/img/icon/history_store.svg',
width: 35.rpx,
height: 35.rpx,
color: Colors.white,
)))
],
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
// key: scaffoldKey,
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'预约体验',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
),
centerTitle: false,
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
Positioned(
right: 30.rpx,
child: ClickableContainer(
backgroundColor: Colors.transparent,
highlightColor: Color(0xFF055466),
padding: EdgeInsets.only(left: 0),
onTap: () {
TopSlideNotification.show(context,
text: "待开发功能".tr);
// Get.toNamed("/myExperiencePage");
},
child: SvgPicture.asset(
'assets/img/icon/history_store.svg',
width: 35.rpx,
height: 35.rpx,
color: Colors.white,
)))
],
),
body: SingleChildScrollView(
child: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 1,
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
//todo
),
centerTitle: false,
),
body: SingleChildScrollView(
child: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 1,
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
//todo
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0, 40.rpx, 0, 38.rpx),
child: SearchWidget(
keyword: controller.model.keyword,
color: controller.model.color,
hint: "请输入门店名称",
onChange: (d) {
controller.model.keyword = d;
},
findCallback: () {
// controller.page = 0;
// controller.getData();
},
),
),
Obx(() {
if (controller
.model.experienceStoreModelList.length ==
0) {
return CircularProgressIndicator(
strokeWidth: 1,
valueColor:
AlwaysStoppedAnimation<Color>(Colors.white),
);
} else {
return Container();
}
}),
Expanded(
child: Obx(() => ListView(
controller: scrollController,
shrinkWrap: true,
scrollDirection: Axis.vertical,
children: List.generate(
controller
.model
.experienceStoreModelList
.length, (index) {
return ExperienceStoreWidget(
index: index,
data: controller.model
.experienceStoreModelList[index]);
})
.divide(const SizedBox(
height: 25,
))
.addToStart(SizedBox(
height: AppConstants.list_start_height,
))
.addToEnd(SizedBox(
height: AppConstants.list_ano_end_height,
))))),
],
Padding(
padding:
EdgeInsetsDirectional.fromSTEB(0, 40.rpx, 0, 38.rpx),
child: SearchWidget(
keyword: controller.model.keyword,
color: controller.model.color,
hint: "请输入门店名称",
onChange: (d) {
controller.model.keyword = d;
},
findCallback: () {
// controller.page = 0;
// controller.getData();
},
),
),
),
)),
));
Obx(() {
if (controller.model.experienceStoreModelList.length ==
0) {
return CircularProgressIndicator(
strokeWidth: 1,
valueColor:
AlwaysStoppedAnimation<Color>(Colors.white),
);
} else {
return Container();
}
}),
Expanded(
child: Obx(() => ListView(
controller: scrollController,
shrinkWrap: true,
scrollDirection: Axis.vertical,
children: List.generate(
controller.model.experienceStoreModelList
.length, (index) {
return ExperienceStoreWidget(
index: index,
data: controller
.model.experienceStoreModelList[index]);
})
.divide(const SizedBox(
height: 25,
))
.addToStart(SizedBox(
height: AppConstants.list_start_height,
))
.addToEnd(SizedBox(
height: AppConstants.list_ano_end_height,
))))),
],
),
),
)),
));
});
}
}

View File

@@ -52,315 +52,292 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
});
int login = userInfoController.model.login!;
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// // onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
body: SafeArea(
child: Container(
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height,
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: (userInfoController.model.login! != null &&
userInfoController.model.login! == 1)
? MainAxisAlignment.start
: MainAxisAlignment.center,
children: [
//未登录
Obx(() {
if (userInfoController.model.login! == null ||
userInfoController.model.login! == 0) {
return Center(
child: InkWell(
onTap: () => Get.toNamed("/loginPage"),
child: RichText(
text: TextSpan(
children: [
WidgetSpan(
child: Stack(
children: [
Text(
"登录",
style: TextStyle(
color: stringToColor("#84F5FF"),
fontSize: 30.rpx,
),
),
Positioned(
bottom: 0, // 控制下划线与文字的间距
left: 0,
right: 0,
child: Container(
height: 1, // 下划线粗细
color: stringToColor("#84F5FF"),
),
),
],
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
body: SafeArea(
child: Container(
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height,
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: (userInfoController.model.login! != null &&
userInfoController.model.login! == 1)
? MainAxisAlignment.start
: MainAxisAlignment.center,
children: [
//未登录
Obx(() {
if (userInfoController.model.login! == null ||
userInfoController.model.login! == 0) {
return Center(
child: InkWell(
onTap: () => Get.toNamed("/loginPage"),
child: RichText(
text: TextSpan(
children: [
WidgetSpan(
child: Stack(
children: [
Text(
"登录",
style: TextStyle(
color: stringToColor("#84F5FF"),
fontSize: 30.rpx,
),
),
),
TextSpan(
text: "查看睡眠报告",
Positioned(
bottom: 0, // 控制下划线与文字的间距
left: 0,
right: 0,
child: Container(
height: 1, // 下划线粗细
color: stringToColor("#84F5FF"),
),
),
],
),
),
TextSpan(
text: "查看睡眠报告",
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
],
),
),
),
);
}
return Container();
}),
//已登录
Obx(() {
if (userInfoController.model.login! != null &&
userInfoController.model.login! == 1) {
final list = deviceController.personnelList.value;
// if (list.isNotEmpty &&
// formFieldController.value == null) {
// WidgetsBinding.instance.addPostFrameCallback((_) {
// formFieldController.value = list[0]["mac"];
// personInfo.value = list[0];
// homeController.selectPerson.value = list[0];
// homeController.selectDevcie.value = list[0]["mac"];
// deviceController
// .getSleeps(formFieldController.value);
// homeController.updateAll();
// });
// }
if (list.isNotEmpty) {
WidgetsBinding.instance.addPostFrameCallback((_) {
formFieldController.value = list[0]["mac"];
personInfo.value = list[0];
homeController.selectPerson.value = list[0];
homeController.selectDevcie.value = list[0]["mac"];
deviceController.getSleeps(formFieldController.value);
homeController.updateAll();
});
}
//themeController.currentColor.sc5,
if (homeController.personnelList.value.length != 0)
return Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0.rpx, 40.rpx, 30.rpx, 10.rpx),
child: Container(
width: MediaQuery.sizeOf(context).width,
constraints: BoxConstraints(
minHeight: 60.rpx,
),
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(20.rpx),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
30.rpx, 16.rpx, 16.rpx, 25.rpx),
child: Container(
width: MediaQuery.sizeOf(context).width,
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'健康报告'.tr,
style: TextStyle(
color: Colors.white,
fontFamily: 'Readex Pro',
color: themeController.currentColor.sc3,
letterSpacing: 0,
fontSize: 30.rpx,
),
),
ScrollbarTheme(
data: ScrollbarThemeData(
thumbColor: MaterialStateProperty.all(
Colors.transparent),
trackColor: MaterialStateProperty.all(
Colors.transparent),
trackBorderColor:
MaterialStateProperty.all(
Colors.transparent),
),
child: ValueListenableBuilder(
valueListenable: formFieldController,
builder: (c, a, s) => ClipRRect(
borderRadius:
BorderRadius.circular(36.rpx),
child: Theme(
data: Theme.of(context).copyWith(
splashColor: Colors.transparent,
highlightColor:
Colors.transparent,
hoverColor: Colors.transparent,
),
child:
FlutterFlowDropDown<String>(
controller: formFieldController,
options: deviceController
.personnelList.value
.map<String>(
(d) => "${d["mac"]}")
.toList(),
optionLabels: deviceController
.personnelList.value
.map<String>((d) {
var s = d["name"] ?? d["mac"];
if (s == null) {
return "";
} else {
return "$s";
}
}).toList(),
onChanged: (val) {
final list = deviceController
.personnelList.value;
final selectedPerson =
list.firstWhere(
(element) =>
element['mac'] == val,
orElse: () =>
null, // 防止找不到时报错
);
homeController.selectPerson
.value = selectedPerson;
personInfo.value =
selectedPerson;
homeController
.selectedDayIndex =
(6).obs;
print("$val");
if (val == null) {
homeController
.sleepDays.value = [];
} else {
homeController.selectDevcie
.value =
formFieldController
.value!;
deviceController.getSleeps(
formFieldController
.value);
homeController.updateAll();
}
},
width: 300.rpx,
height: 81.rpx,
maxHeight: 300.rpx,
textStyle: TextStyle(
fontSize: 28.rpx,
overflow:
TextOverflow.ellipsis,
color: Colors.white,
),
hintText: '',
icon: Icon(
Icons
.keyboard_arrow_down_rounded,
color:
stringToColor("#FFFFFF"),
size: 30.rpx,
),
fillColor:
stringToColor("#184468"),
elevation: 2,
borderColor: Colors.transparent,
borderWidth: 2,
borderRadius: 100.rpx,
margin: EdgeInsetsDirectional
.fromSTEB(32.rpx, 8.rpx,
32.rpx, 8.rpx),
hidesUnderline: true,
isOverButton: false,
isSearchable: false,
isMultiSelect: false,
),
))),
),
],
),
),
),
);
}
return Container();
}),
//已登录
Obx(() {
if (userInfoController.model.login! != null &&
userInfoController.model.login! == 1) {
final list = deviceController.personnelList.value;
// if (list.isNotEmpty &&
// formFieldController.value == null) {
// WidgetsBinding.instance.addPostFrameCallback((_) {
// formFieldController.value = list[0]["mac"];
// personInfo.value = list[0];
// homeController.selectPerson.value = list[0];
// homeController.selectDevcie.value = list[0]["mac"];
// deviceController
// .getSleeps(formFieldController.value);
// homeController.updateAll();
// });
// }
if (list.isNotEmpty) {
WidgetsBinding.instance.addPostFrameCallback((_) {
formFieldController.value = list[0]["mac"];
personInfo.value = list[0];
homeController.selectPerson.value = list[0];
homeController.selectDevcie.value = list[0]["mac"];
deviceController
.getSleeps(formFieldController.value);
homeController.updateAll();
});
}
//themeController.currentColor.sc5,
if (homeController.personnelList.value.length != 0)
return Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0.rpx, 40.rpx, 30.rpx, 10.rpx),
child: Container(
width: MediaQuery.sizeOf(context).width,
constraints: BoxConstraints(
minHeight: 60.rpx,
),
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(20.rpx),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
30.rpx, 16.rpx, 16.rpx, 25.rpx),
child: Container(
width: MediaQuery.sizeOf(context).width,
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'健康报告'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color:
themeController.currentColor.sc3,
letterSpacing: 0,
fontSize: 30.rpx,
),
),
ScrollbarTheme(
data: ScrollbarThemeData(
thumbColor: MaterialStateProperty.all(
Colors.transparent),
trackColor: MaterialStateProperty.all(
Colors.transparent),
trackBorderColor:
MaterialStateProperty.all(
Colors.transparent),
),
child: ValueListenableBuilder(
valueListenable:
formFieldController,
builder: (c, a, s) => ClipRRect(
borderRadius:
BorderRadius.circular(
36.rpx),
child: Theme(
data: Theme.of(context)
.copyWith(
splashColor:
Colors.transparent,
highlightColor:
Colors.transparent,
hoverColor:
Colors.transparent,
),
child: FlutterFlowDropDown<
String>(
controller:
formFieldController,
options: deviceController
.personnelList.value
.map<String>((d) =>
"${d["mac"]}")
.toList(),
optionLabels:
deviceController
.personnelList.value
.map<String>((d) {
var s =
d["name"] ?? d["mac"];
if (s == null) {
return "";
} else {
return "$s";
}
}).toList(),
onChanged: (val) {
final list =
deviceController
.personnelList
.value;
final selectedPerson =
list.firstWhere(
(element) =>
element['mac'] ==
val,
orElse: () =>
null, // 防止找不到时报错
);
homeController
.selectPerson
.value =
selectedPerson;
personInfo.value =
selectedPerson;
),
);
}
if (userInfoController.model.login != null &&
userInfoController.model.login == 1)
return Expanded(child: NullDataWidget());
return Container();
}),
homeController
.selectedDayIndex =
(6).obs;
print("$val");
if (val == null) {
homeController.sleepDays
.value = [];
} else {
homeController
.selectDevcie
.value =
formFieldController
.value!;
deviceController.getSleeps(
formFieldController
.value);
homeController
.updateAll();
}
},
width: 300.rpx,
height: 81.rpx,
maxHeight: 300.rpx,
textStyle: TextStyle(
fontSize: 28.rpx,
overflow:
TextOverflow.ellipsis,
color: Colors.white,
),
hintText: '',
icon: Icon(
Icons
.keyboard_arrow_down_rounded,
color: stringToColor(
"#FFFFFF"),
size: 30.rpx,
),
fillColor: stringToColor(
"#184468"),
elevation: 2,
borderColor:
Colors.transparent,
borderWidth: 2,
borderRadius: 100.rpx,
margin:
EdgeInsetsDirectional
.fromSTEB(
32.rpx,
8.rpx,
32.rpx,
8.rpx),
hidesUnderline: true,
isOverButton: false,
isSearchable: false,
isMultiSelect: false,
),
))),
),
],
),
),
),
),
);
}
if (userInfoController.model.login != null &&
userInfoController.model.login == 1)
return Expanded(child: NullDataWidget());
return Container();
}),
Obx(() {
if (homeController.selectDevcie.value != null &&
homeController.selectDevcie.value!.isNotEmpty &&
deviceController.personnelList.value.isNotEmpty)
return Expanded(
child: NewSleepReportPage(
data: {
"tag": "123",
'date': DateTime.now().millisecondsSinceEpoch,
'mac': homeController.selectDevcie.value,
'person': homeController.selectPerson.value,
'backgroundImg': 'assets/images/new_background.png',
'arrow': false,
'noBackImg': true,
'person_show': false,
},
),
);
// }
return Container();
}),
Obx(() {
if (homeController.selectDevcie.value != null &&
homeController.selectDevcie.value!.isNotEmpty &&
deviceController.personnelList.value.isNotEmpty)
return Expanded(
child: NewSleepReportPage(
data: {
"tag": "123",
'date': DateTime.now().millisecondsSinceEpoch,
'mac': homeController.selectDevcie.value,
'person': homeController.selectPerson.value,
'backgroundImg':
'assets/images/new_background.png',
'arrow': false,
'noBackImg': true,
'person_show': false,
},
),
);
// }
return Container();
}),
// Expanded(
// child: NewSleepReportPage(
// data: {
// "tag": "123",
// 'date': DateTime.now().millisecondsSinceEpoch,
// 'mac': homeController.selectDevcie.value,
// 'person': homeController.selectPerson.value,
// 'backgroundImg': 'assets/images/new_background.png',
// },
// ),
// ),
// }
],
),
),
// Expanded(
// child: NewSleepReportPage(
// data: {
// "tag": "123",
// 'date': DateTime.now().millisecondsSinceEpoch,
// 'mac': homeController.selectDevcie.value,
// 'person': homeController.selectPerson.value,
// 'backgroundImg': 'assets/images/new_background.png',
// },
// ),
// ),
// }
],
),
),
));
),
),
));
}
}

View File

@@ -37,7 +37,7 @@ class _MhtSleepReportReturnPageState extends State<MhtSleepReportReturnPage> {
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(

File diff suppressed because it is too large Load Diff

View File

@@ -32,171 +32,171 @@ class IssueListPage extends GetView<IssueListController> {
return LayoutBuilder(builder: (context, cc) {
bodysize = cc;
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'问题与帮助',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
actions: [],
centerTitle: false,
),
// backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
body: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 1,
decoration: BoxDecoration(
// color: AppColors.bg_color,
// color: Color(0xFFF6F6F6),
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'问题与帮助',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
child: Obx(() {
if (controller.model.isLoading) {
return Center(child: CircularProgressIndicator()); // ✅ 加载中
}
if (controller.model.issueList.isEmpty) {
return Container(
width: MediaQuery.sizeOf(context).width,
height: 100,
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(31, 27, 0, 0),
child: Align(
alignment: AlignmentDirectional(-1, 0),
child: Text(
'暂无内容!',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF9EA4B7),
fontSize: AppFontsize.title_size,
fontWeight: FontWeight.w600,
),
),
),
),
);
}
// 有数据时渲染列表
return ListView(
children: controller.model.issueList!
.asMap()
.entries
.map((e) => IssuePreviewWidget(
index: e.key,
issueListController: controller,
))
.toList(),
);
}),
// Obx(() {
// return Visibility(
// visible: controller.model.issueList != null &&
// controller.model.issueList.isNotEmpty,
// replacement: Container(
// width: MediaQuery.sizeOf(context).width,
// height: 100,
// decoration: BoxDecoration(
// color: FlutterFlowTheme.of(context).secondaryBackground,
// ),
// child: Padding(
// padding: EdgeInsetsDirectional.fromSTEB(31, 27, 0, 0),
// child: Column(
// mainAxisSize: MainAxisSize.max,
// children: [
// Align(
// alignment: AlignmentDirectional(-1, 0),
// child: Text(
// '暂无内容!',
// style: FlutterFlowTheme.of(context)
// .bodyMedium
// .override(
// fontFamily: 'Readex Pro',
// color: Color(0xFF9EA4B7),
// fontSize: AppFontsize.title_size,
// letterSpacing: 0,
// fontWeight: FontWeight.w600,
// ),
// ),
// ),
// ],
// ),
// ),
// ),
// child: Column(
// mainAxisSize: MainAxisSize.max,
// children: [
// // TitleComponentWidget(
// // titleName: '问题与帮助',
// // ),
// Flexible(
// child: Padding(
// padding:
// EdgeInsetsDirectional.fromSTEB(15, 13, 15, 15),
// child: Container(
// width: bodysize!.maxWidth,
// decoration: BoxDecoration(
// // color: Colors.white,
// // borderRadius: BorderRadius.circular(16),
// ),
// child: Obx(() => ListView(
// padding: const EdgeInsets.fromLTRB(
// 0,
// 5,
// 0,
// 0,
// ),
// shrinkWrap: true,
// scrollDirection: Axis.vertical,
// children: (controller.model.issueList!
// .asMap()
// .entries
// .map((e) => IssuePreviewWidget(
// index: e.key,
// issueListController: controller))
// .toList() as List<Widget>))),
// ),
// ),
// ),
// ],
// ),
// );
// }),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
));
actions: [],
centerTitle: false,
),
// backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
body: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 1,
decoration: BoxDecoration(
// color: AppColors.bg_color,
// color: Color(0xFFF6F6F6),
),
child: Obx(() {
if (controller.model.isLoading) {
return Center(child: CircularProgressIndicator()); // ✅ 加载中
}
if (controller.model.issueList.isEmpty) {
return Container(
width: MediaQuery.sizeOf(context).width,
height: 100,
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(31, 27, 0, 0),
child: Align(
alignment: AlignmentDirectional(-1, 0),
child: Text(
'暂无内容!',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF9EA4B7),
fontSize: AppFontsize.title_size,
fontWeight: FontWeight.w600,
),
),
),
),
);
}
// 有数据时渲染列表
return ListView(
children: controller.model.issueList!
.asMap()
.entries
.map((e) => IssuePreviewWidget(
index: e.key,
issueListController: controller,
))
.toList(),
);
}),
// Obx(() {
// return Visibility(
// visible: controller.model.issueList != null &&
// controller.model.issueList.isNotEmpty,
// replacement: Container(
// width: MediaQuery.sizeOf(context).width,
// height: 100,
// decoration: BoxDecoration(
// color: FlutterFlowTheme.of(context).secondaryBackground,
// ),
// child: Padding(
// padding: EdgeInsetsDirectional.fromSTEB(31, 27, 0, 0),
// child: Column(
// mainAxisSize: MainAxisSize.max,
// children: [
// Align(
// alignment: AlignmentDirectional(-1, 0),
// child: Text(
// '暂无内容!',
// style: FlutterFlowTheme.of(context)
// .bodyMedium
// .override(
// fontFamily: 'Readex Pro',
// color: Color(0xFF9EA4B7),
// fontSize: AppFontsize.title_size,
// letterSpacing: 0,
// fontWeight: FontWeight.w600,
// ),
// ),
// ),
// ],
// ),
// ),
// ),
// child: Column(
// mainAxisSize: MainAxisSize.max,
// children: [
// // TitleComponentWidget(
// // titleName: '问题与帮助',
// // ),
// Flexible(
// child: Padding(
// padding:
// EdgeInsetsDirectional.fromSTEB(15, 13, 15, 15),
// child: Container(
// width: bodysize!.maxWidth,
// decoration: BoxDecoration(
// // color: Colors.white,
// // borderRadius: BorderRadius.circular(16),
// ),
// child: Obx(() => ListView(
// padding: const EdgeInsets.fromLTRB(
// 0,
// 5,
// 0,
// 0,
// ),
// shrinkWrap: true,
// scrollDirection: Axis.vertical,
// children: (controller.model.issueList!
// .asMap()
// .entries
// .map((e) => IssuePreviewWidget(
// index: e.key,
// issueListController: controller))
// .toList() as List<Widget>))),
// ),
// ),
// ),
// ],
// ),
// );
// }),
),
),
));
});
}
}

View File

@@ -29,7 +29,7 @@ class _MessageDetailPageState extends State<MessageDetailPage> {
var messageInfo = widget.data;
return LayoutBuilder(
builder: (context, boxConstraints) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(

View File

@@ -144,7 +144,7 @@ class _MessagePageState extends State<MessagePage> {
return LayoutBuilder(
builder: (context, boxConstraints) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
@@ -261,7 +261,6 @@ class _MessagePageState extends State<MessagePage> {
),
),
);
}
Container bottomIcon(BuildContext context) {

View File

@@ -50,103 +50,102 @@ class _MyExperiencePageState extends State<MyExperiencePage> {
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
// key: scaffoldKey,
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
// leading: returnIconButtomAddCallback(() {
// controller.saveDataApi();
// updateParm(isShowToast: false);
// }),
// leading: returnIconButtomNew,
title: Container(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'我的预约',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
// key: scaffoldKey,
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
// leading: returnIconButtomAddCallback(() {
// controller.saveDataApi();
// updateParm(isShowToast: false);
// }),
// leading: returnIconButtomNew,
title: Container(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'我的预约',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
),
actions: [],
centerTitle: false,
),
body: Container(
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height * 1,
decoration: BoxDecoration(
color: Color(0xFFF6F6F6),
),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
// TitleComponentWidget(
// titleName: '我的预约',
// ),
Obx(() {
if (controller.model.bookInfoList.length == 0) {
return Empty();
} else {
return Container();
}
}),
Expanded(
child: Container(
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height * 1,
decoration: BoxDecoration(),
child: Obx(() => ListView(
controller: scrollController,
shrinkWrap: true,
scrollDirection: Axis.vertical,
children: [
const SizedBox(
height: AppConstants.list_start_height),
...List.generate(
controller.model.bookInfoList.length,
(index) {
return MyExperienceWidget(
index: index,
bookExperienceListController: controller);
}),
SizedBox(
height: AppConstants.list_end_height,
)
],
))),
)
],
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
));
actions: [],
centerTitle: false,
),
body: Container(
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height * 1,
decoration: BoxDecoration(
color: Color(0xFFF6F6F6),
),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
// TitleComponentWidget(
// titleName: '我的预约',
// ),
Obx(() {
if (controller.model.bookInfoList.length == 0) {
return Empty();
} else {
return Container();
}
}),
Expanded(
child: Container(
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height * 1,
decoration: BoxDecoration(),
child: Obx(() => ListView(
controller: scrollController,
shrinkWrap: true,
scrollDirection: Axis.vertical,
children: [
const SizedBox(
height: AppConstants.list_start_height),
...List.generate(
controller.model.bookInfoList.length, (index) {
return MyExperienceWidget(
index: index,
bookExperienceListController: controller);
}),
SizedBox(
height: AppConstants.list_end_height,
)
],
))),
)
],
),
),
),
));
}
}

View File

@@ -71,7 +71,7 @@ class _MinePageState extends State<NewMinePage> {
int login = userInfoController.model.login!;
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(

View File

@@ -31,7 +31,7 @@ class _SettingPageState extends State<SettingPage> {
Widget build(BuildContext context) {
return LayoutBuilder(builder: (context, bodySize) {
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(

View File

@@ -37,7 +37,7 @@ class _PrivacyPolicyPageState extends State<PrivacyPolicyPage> {
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(
@@ -71,6 +71,7 @@ class _PrivacyPolicyPageState extends State<PrivacyPolicyPage> {
fontSize: 30.rpx,
),
),
/// 左边返回按钮
Positioned(
left: 0,

File diff suppressed because it is too large Load Diff

View File

@@ -39,231 +39,221 @@ class DeviceRepairPage extends GetView<RepairListController> {
@override
Widget build(BuildContext context) {
return LayoutBuilder(builder: (context, cc) {
bodysize = cc;
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
// key: scaffoldKey,
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
iconTheme: const IconThemeData(color: Colors.white),
automaticallyImplyLeading: false,
titleSpacing: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'设备报修',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
// key: scaffoldKey,
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
iconTheme: const IconThemeData(color: Colors.white),
automaticallyImplyLeading: false,
titleSpacing: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'设备报修',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
),
centerTitle: false,
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
body: SafeArea(
top: true,
child: Padding(
padding: EdgeInsets.fromLTRB(30.rpx, 6.rpx, 30.rpx, 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// 报修须知
Container(
height: 412.rpx,
decoration: BoxDecoration(
border: Border.all(
color: Color(0XFFC8CBD2), width: 0.rpx),
borderRadius: BorderRadius.circular(10),
),
child: Padding(
padding: EdgeInsets.fromLTRB(
27.rpx, 49.rpx, 43.rpx, 39.rpx),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
// 固定的标题部分
Text(
"报修须知",
style: TextStyle(
fontSize: 30.rpx,
fontWeight: FontWeight.bold,
color: Colors.white,
),
textAlign: TextAlign.center,
),
SizedBox(height: 33.rpx),
// 可滚动的正文部分,限定高度
Expanded(
child: SingleChildScrollView(
child: RichText(
text: TextSpan(
style: TextStyle(
color: Color(0XFF929699),
fontSize: 26.rpx,
),
children: [
TextSpan(
text:
"尊敬的用户感谢您选择我司产品。在使用过程中如果设备出现故障需要维修请首先确认设备是否正确连接控制器或网络检查设置是否正常排除误操作问题。若问题依然存在请记录下设备名称、设备编号、和具体故障内容方便我们快速地为您提供帮助。您可以通过智慧棉花糖APP保修页面直接报修或拨打 ",
style: TextStyle(
color:
Color(0XFF929699),
fontSize: 26.rpx,
height: 1.3)),
TextSpan(
text: "400-8756-966",
style: TextStyle(
color: Colors.white,
// height: 1.3,
decoration: TextDecoration
.underline, // 添加下划线
decorationColor:
Colors.white,
decorationThickness: 4.rpx,
),
recognizer:
TapGestureRecognizer()
..onTap = () {
MyUtils.makePhoneCall(
"400-8756-966");
},
),
TextSpan(
text: " 反馈。",
style: TextStyle(
color:
Color(0XFF929699),
fontSize: 26.rpx,
height: 1.3)),
],
),
),
),
),
],
))),
SizedBox(height: 24.rpx),
InkWell(
onTap: () {},
child: CustomCard(
borderRadius: 16.rpx,
gradientDirection: GradientDirection.vertical,
onTap: () {
Get.toNamed("/applyRepairPage");
},
colors: const [
Color(0xFFFCFCFC),
Color(0xFFF8FAF9),
Color(0XFFECF6F3),
Color(0XFFD9F0E9),
Color(0xFFCEECE3)
],
child: Container(
width: double.infinity,
height: 90.rpx,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
),
child: Text(
"我要报修",
),
centerTitle: false,
),
body: SafeArea(
top: true,
child: Padding(
padding: EdgeInsets.fromLTRB(30.rpx, 6.rpx, 30.rpx, 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// 报修须知
Container(
height: 412.rpx,
decoration: BoxDecoration(
border: Border.all(
color: Color(0XFFC8CBD2), width: 0.rpx),
borderRadius: BorderRadius.circular(10),
),
child: Padding(
padding: EdgeInsets.fromLTRB(
27.rpx, 49.rpx, 43.rpx, 39.rpx),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// 固定的标题部分
Text(
"报修须知",
style: TextStyle(
fontFamily: 'Readex Pro',
color: stringToColor("#011D33"),
letterSpacing: 0,
fontSize: 30.rpx,
fontWeight: FontWeight.bold,
color: Colors.white,
),
textAlign: TextAlign.center,
),
SizedBox(height: 33.rpx),
// 可滚动的正文部分,限定高度
Expanded(
child: SingleChildScrollView(
child: RichText(
text: TextSpan(
style: TextStyle(
color: Color(0XFF929699),
fontSize: 26.rpx,
),
children: [
TextSpan(
text:
"尊敬的用户感谢您选择我司产品。在使用过程中如果设备出现故障需要维修请首先确认设备是否正确连接控制器或网络检查设置是否正常排除误操作问题。若问题依然存在请记录下设备名称、设备编号、和具体故障内容方便我们快速地为您提供帮助。您可以通过智慧棉花糖APP保修页面直接报修或拨打 ",
style: TextStyle(
color: Color(0XFF929699),
fontSize: 26.rpx,
height: 1.3)),
TextSpan(
text: "400-8756-966",
style: TextStyle(
color: Colors.white,
// height: 1.3,
decoration: TextDecoration
.underline, // 添加下划线
decorationColor: Colors.white,
decorationThickness: 4.rpx,
),
recognizer: TapGestureRecognizer()
..onTap = () {
MyUtils.makePhoneCall(
"400-8756-966");
},
),
TextSpan(
text: " 反馈。",
style: TextStyle(
color: Color(0XFF929699),
fontSize: 26.rpx,
height: 1.3)),
],
),
),
),
),
),
)),
SizedBox(height: 235.rpx),
// 报修历史标题
Container(
width: double.infinity,
child: Text("报修历史",
],
))),
SizedBox(height: 24.rpx),
InkWell(
onTap: () {},
child: CustomCard(
borderRadius: 16.rpx,
gradientDirection: GradientDirection.vertical,
onTap: () {
Get.toNamed("/applyRepairPage");
},
colors: const [
Color(0xFFFCFCFC),
Color(0xFFF8FAF9),
Color(0XFFECF6F3),
Color(0XFFD9F0E9),
Color(0xFFCEECE3)
],
child: Container(
width: double.infinity,
height: 90.rpx,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
),
child: Text(
"我要报修",
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
height: 1)),
),
SizedBox(height: 32.rpx),
// Obx(() {
// return Visibility(
// visible: controller.model.repairList != null &&
// controller.model.repairList!.isNotEmpty,
// replacement: EmptyMessageWidget(),
// child: Expanded(
// child: Obx(() => ListView(
// controller:
// scrollController, // 绑定 ScrollController
// shrinkWrap: true,
// scrollDirection: Axis.vertical,
// children: (controller.model.repairList
// .asMap()
// .entries
// .map((e) => RepairHistoryWidget(
// index: e.key,
// repairListController: controller))
// .toList() as List<Widget>))),
// ),
// );
// }),
// 替换原来的 Obx(() => Visibility(...))
Expanded(
child: Obx(() {
final hasData =
controller.model.repairList != null &&
controller.model.repairList!.isNotEmpty;
return hasData
? ListView(
controller: scrollController,
padding: EdgeInsets.zero,
shrinkWrap: true,
children: controller.model.repairList
.asMap()
.entries
.map((e) => RepairHistoryWidget(
index: e.key,
repairListController:
controller,
))
.toList(),
)
: NullDataWidget();
}),
),
],
fontFamily: 'Readex Pro',
color: stringToColor("#011D33"),
letterSpacing: 0,
fontSize: 30.rpx,
),
),
),
)),
SizedBox(height: 235.rpx),
// 报修历史标题
Container(
width: double.infinity,
child: Text("报修历史",
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
height: 1)),
),
))),
));
SizedBox(height: 32.rpx),
// Obx(() {
// return Visibility(
// visible: controller.model.repairList != null &&
// controller.model.repairList!.isNotEmpty,
// replacement: EmptyMessageWidget(),
// child: Expanded(
// child: Obx(() => ListView(
// controller:
// scrollController, // 绑定 ScrollController
// shrinkWrap: true,
// scrollDirection: Axis.vertical,
// children: (controller.model.repairList
// .asMap()
// .entries
// .map((e) => RepairHistoryWidget(
// index: e.key,
// repairListController: controller))
// .toList() as List<Widget>))),
// ),
// );
// }),
// 替换原来的 Obx(() => Visibility(...))
Expanded(
child: Obx(() {
final hasData = controller.model.repairList != null &&
controller.model.repairList!.isNotEmpty;
return hasData
? ListView(
controller: scrollController,
padding: EdgeInsets.zero,
shrinkWrap: true,
children: controller.model.repairList
.asMap()
.entries
.map((e) => RepairHistoryWidget(
index: e.key,
repairListController: controller,
))
.toList(),
)
: NullDataWidget();
}),
),
],
),
))),
));
});
}
}

View File

@@ -50,7 +50,7 @@ class _RoomPickerPageState extends State<RoomPickerPage> {
return LayoutBuilder(builder: (context, cc) {
bodysize = cc;
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(

View File

@@ -6,6 +6,7 @@ import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/tool/CustomCard.dart';
import 'package:vbvs_app/controller/mh_controller/score_controller.dart' as mh;
class ScorePage extends GetView<mh.ScoreController> {
BoxConstraints? bodysize;
final scaffoldKey = GlobalKey<ScaffoldState>();
@@ -18,432 +19,412 @@ class ScorePage extends GetView<mh.ScoreController> {
return LayoutBuilder(builder: (context, cc) {
bodysize = cc;
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
// key: scaffoldKey,
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
iconTheme: const IconThemeData(color: Colors.white),
automaticallyImplyLeading: false,
titleSpacing: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'评价'.tr,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
child: Scaffold(
// key: scaffoldKey,
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
iconTheme: const IconThemeData(color: Colors.white),
automaticallyImplyLeading: false,
titleSpacing: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'评价'.tr,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
centerTitle: false,
),
centerTitle: false,
),
body: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 1,
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
// TitleComponentWidget(
// titleName: '评价',
// ),
Expanded(
child: Container(
width: bodysize!.maxWidth,
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Padding(
body: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 1,
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
// TitleComponentWidget(
// titleName: '评价',
// ),
Expanded(
child: Container(
width: bodysize!.maxWidth,
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
30.rpx, 26.rpx, 30.rpx, 0),
child: Container(
width: bodysize!.maxWidth,
constraints: BoxConstraints(
minWidth: 346,
minHeight: 115,
),
decoration: BoxDecoration(
color: Color(0xFF003058),
borderRadius: BorderRadius.circular(16),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
30.rpx, 26.rpx, 30.rpx, 0),
22, 27, 17, 22),
child: Container(
width: bodysize!.maxWidth,
constraints: BoxConstraints(
minWidth: 346,
minHeight: 115,
),
decoration: BoxDecoration(
color: Color(0xFF003058),
borderRadius: BorderRadius.circular(16),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
22, 27, 17, 22),
child: Container(
width: bodysize!.maxWidth,
decoration: BoxDecoration(
color: Color(0xFF003058),
borderRadius: BorderRadius.circular(16),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Align(
alignment: AlignmentDirectional(0, 0),
child: Text(
'我要评价'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
fontSize: 30.rpx,
letterSpacing: 0,
color: Colors.white),
),
),
child: Column(
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
MainAxisAlignment.center,
children: [
Align(
alignment:
AlignmentDirectional(0, 0),
child: Text(
'我要评价'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
fontSize: 30.rpx,
letterSpacing: 0,
color: Colors.white),
),
InkWell(
onTap: () {
controller.model.score = 1;
controller.updateAll();
},
child: Obx(() {
return Icon(
Icons.star,
color: controller
.model.score! >=
1
? stringToColor("#F8AE00")
: stringToColor("#D0D0D0"),
size: 40,
);
}),
),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
InkWell(
onTap: () {
controller.model.score = 1;
controller.updateAll();
},
child: Obx(() {
return Icon(
Icons.star,
color: controller
.model.score! >=
1
? stringToColor(
"#F8AE00")
: stringToColor(
"#D0D0D0"),
size: 40,
);
}),
),
InkWell(
onTap: () {
controller.model.score = 2;
controller.updateAll();
},
child: Obx(() {
return Icon(
Icons.star,
color: controller
.model.score! >=
2
? stringToColor(
"#F8AE00")
: stringToColor(
"#D0D0D0"),
size: 40,
);
}),
),
InkWell(
onTap: () {
controller.model.score = 3;
controller.updateAll();
},
child: Obx(() {
return Icon(
Icons.star,
color: controller
.model.score! >=
3
? stringToColor(
"#F8AE00")
: stringToColor(
"#D0D0D0"),
size: 40,
);
}),
),
InkWell(
onTap: () {
controller.model.score = 4;
controller.updateAll();
},
child: Obx(() {
return Icon(
Icons.star,
color: controller
.model.score! >=
4
? stringToColor(
"#F8AE00")
: stringToColor(
"#D0D0D0"),
size: 40,
);
}),
),
InkWell(
onTap: () {
controller.model.score = 5;
controller.updateAll();
},
child: Obx(() {
return Icon(
Icons.star,
color: controller
.model.score! >=
5
? stringToColor(
"#F8AE00")
: stringToColor(
"#D0D0D0"),
size: 40,
);
}),
),
].divide(SizedBox(width: 10)),
InkWell(
onTap: () {
controller.model.score = 2;
controller.updateAll();
},
child: Obx(() {
return Icon(
Icons.star,
color: controller
.model.score! >=
2
? stringToColor("#F8AE00")
: stringToColor("#D0D0D0"),
size: 40,
);
}),
),
].divide(SizedBox(height: 26)),
InkWell(
onTap: () {
controller.model.score = 3;
controller.updateAll();
},
child: Obx(() {
return Icon(
Icons.star,
color: controller
.model.score! >=
3
? stringToColor("#F8AE00")
: stringToColor("#D0D0D0"),
size: 40,
);
}),
),
InkWell(
onTap: () {
controller.model.score = 4;
controller.updateAll();
},
child: Obx(() {
return Icon(
Icons.star,
color: controller
.model.score! >=
4
? stringToColor("#F8AE00")
: stringToColor("#D0D0D0"),
size: 40,
);
}),
),
InkWell(
onTap: () {
controller.model.score = 5;
controller.updateAll();
},
child: Obx(() {
return Icon(
Icons.star,
color: controller
.model.score! >=
5
? stringToColor("#F8AE00")
: stringToColor("#D0D0D0"),
size: 40,
);
}),
),
].divide(SizedBox(width: 10)),
),
),
].divide(SizedBox(height: 26)),
),
),
),
Padding(
),
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
30.rpx, 30.rpx, 30.rpx, 0),
child: Container(
width: bodysize!.maxWidth,
constraints: BoxConstraints(
minWidth: 346,
minHeight: 152,
),
decoration: BoxDecoration(
color: Color(0xFF003058),
borderRadius: BorderRadius.circular(16.rpx),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
30.rpx, 30.rpx, 30.rpx, 0),
14, 14, 14, 21),
child: Container(
width: bodysize!.maxWidth,
constraints: BoxConstraints(
minWidth: 346,
minHeight: 152,
),
decoration: BoxDecoration(
color: Color(0xFF003058),
borderRadius: BorderRadius.circular(16.rpx),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
14, 14, 14, 21),
child: Container(
width: bodysize!.maxWidth,
decoration: BoxDecoration(
color: Color(0xFF003058),
borderRadius:
BorderRadius.circular(16.rpx),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Align(
alignment: AlignmentDirectional(0, 0),
child: Obx(() {
String scoreText;
Color scoreColor;
if (controller.model.score == 1) {
scoreText = '';
scoreColor =
stringToColor("#E55E92");
} else if (controller.model.score ==
2) {
scoreText = '较差';
scoreColor =
stringToColor("#E55E92");
} else if (controller.model.score ==
3) {
scoreText = '一般';
scoreColor =
stringToColor("#07C160");
} else if (controller.model.score ==
4) {
scoreText = '优秀';
scoreColor =
stringToColor("#F8AE00");
} else if (controller.model.score ==
5) {
scoreText = '完美';
scoreColor =
stringToColor("#F8AE00");
} else {
scoreText = '未评分'; // 如果没有评分显示默认文字
scoreColor = Colors.grey; // 默认颜色
}
return Text(
scoreText,
style: TextStyle(
fontFamily: 'Readex Pro',
fontSize: 30.rpx,
letterSpacing: 0,
color: scoreColor,
fontWeight: FontWeight.bold),
);
}),
),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Align(
alignment:
AlignmentDirectional(0, 0),
child: Obx(() {
String scoreText;
Color scoreColor;
if (controller.model.score == 1) {
scoreText = '';
scoreColor =
stringToColor("#E55E92");
} else if (controller
.model.score ==
2) {
scoreText = '较差';
scoreColor =
stringToColor("#E55E92");
} else if (controller
.model.score ==
3) {
scoreText = '一般';
scoreColor =
stringToColor("#07C160");
} else if (controller
.model.score ==
4) {
scoreText = '优秀';
scoreColor =
stringToColor("#F8AE00");
} else if (controller
.model.score ==
5) {
scoreText = '完美';
scoreColor =
stringToColor("#F8AE00");
} else {
scoreText =
'未评分'; // 如果没有评分显示默认文字
scoreColor =
Colors.grey; // 默认颜色
}
return Text(
scoreText,
style: TextStyle(
fontFamily: 'Readex Pro',
fontSize: 30.rpx,
letterSpacing: 0,
color: scoreColor,
fontWeight:
FontWeight.bold),
);
}),
Align(
alignment: AlignmentDirectional(-1, 0),
child: Padding(
padding:
EdgeInsetsDirectional.fromSTEB(
0, 17, 0, 0),
child: Text(
'再多的溢美之词都比不上您真心的评价。我们愿付出200%的努力只为您100%的满意~感谢您的支持与厚爱!',
style: TextStyle(
fontFamily: 'Readex Pro',
fontSize: 26.rpx,
letterSpacing: 0,
color: Color(0xFF9AA0B3)),
),
Align(
alignment:
AlignmentDirectional(-1, 0),
child: Padding(
padding: EdgeInsetsDirectional
.fromSTEB(0, 17, 0, 0),
child: Text(
'再多的溢美之词都比不上您真心的评价。我们愿付出200%的努力只为您100%的满意~感谢您的支持与厚爱!',
style: TextStyle(
fontFamily: 'Readex Pro',
fontSize: 26.rpx,
letterSpacing: 0,
color: Color(0xFF9AA0B3)),
),
),
),
],
),
),
),
],
),
),
),
],
),
),
),
],
),
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
15, 0, 15, AppConstants.page_button_bottom_padding),
child: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 0.056,
),
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
15, 0, 15, AppConstants.page_button_bottom_padding),
child: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 0.056,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16.rpx),
),
// child: Container(
// width: bodysize!.maxWidth,
// height: bodysize!.maxHeight * 0.056,
// decoration: BoxDecoration(
// color: FlutterFlowTheme.of(context)
// .secondaryBackground,
// borderRadius: BorderRadius.circular(12),
// ),
// child: FFButtonWidget(
// onPressed: () {
// // RepairListController repairListController =
// // Get.find();
// // RepairInfoController repairInfoController =
// // Get.find();
// // repairListController
// // .addScore(
// // repairInfoController
// // .model.applyRepairModel!.id!,
// // controller.model.score!)
// // .then((String msg) {
// // if (msg != null && msg.isNotEmpty) {
// // MyDialogController myDialogController =
// // Get.find();
// // showToast("评价失败,请稍后再试");
// // } else {
// // MyDialogController myDialogController =
// // Get.find();
// // myDialogController
// // .showCustomDialog(context, "评价成功",
// // textColor: stringToColor("#71E2A3"))
// // .then((_) {
// // // 弹窗关闭后执行的代码
// // // Get.toNamed("/userInfoPage");
// // repairInfoController.model.applyRepairModel!
// // .score = controller.model.score!;
// // repairInfoController.updateAll();
// // Get.back();
// // }).catchError((error) {
// // // 处理弹窗显示错误的逻辑
// // print("弹窗显示失败: $error");
// // });
// // }
// // });
// },
// text: '确定',
// options: FFButtonOptions(
// height: 40,
// padding:
// EdgeInsetsDirectional.fromSTEB(24, 0, 24, 0),
// iconPadding:
// EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0),
// color: Color(0xFFD3B684),
// textStyle: FlutterFlowTheme.of(context)
// .titleSmall
// .override(
// fontFamily: 'Readex Pro',
// color: Colors.white,
// fontSize: 13,
// letterSpacing: 0,
// ),
// elevation: 0,
// borderSide: BorderSide(
// color: Colors.transparent,
// width: 1,
// ),
// borderRadius: BorderRadius.circular(8),
// ),
// ),
// ),
child: CustomCard(
borderRadius: 16.rpx,
gradientDirection: GradientDirection.vertical,
onTap: () {
Get.toNamed("/applyRepairPage");
},
colors: const [
Color(0xFFFCFCFC),
Color(0xFFF8FAF9),
Color(0XFFECF6F3),
Color(0XFFD9F0E9),
Color(0xFFCEECE3)
],
child: Container(
width: double.infinity,
height: 90.rpx,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16.rpx),
),
// child: Container(
// width: bodysize!.maxWidth,
// height: bodysize!.maxHeight * 0.056,
// decoration: BoxDecoration(
// color: FlutterFlowTheme.of(context)
// .secondaryBackground,
// borderRadius: BorderRadius.circular(12),
// ),
// child: FFButtonWidget(
// onPressed: () {
// // RepairListController repairListController =
// // Get.find();
// // RepairInfoController repairInfoController =
// // Get.find();
// // repairListController
// // .addScore(
// // repairInfoController
// // .model.applyRepairModel!.id!,
// // controller.model.score!)
// // .then((String msg) {
// // if (msg != null && msg.isNotEmpty) {
// // MyDialogController myDialogController =
// // Get.find();
// // showToast("评价失败,请稍后再试");
// // } else {
// // MyDialogController myDialogController =
// // Get.find();
// // myDialogController
// // .showCustomDialog(context, "评价成功",
// // textColor: stringToColor("#71E2A3"))
// // .then((_) {
// // // 弹窗关闭后执行的代码
// // // Get.toNamed("/userInfoPage");
// // repairInfoController.model.applyRepairModel!
// // .score = controller.model.score!;
// // repairInfoController.updateAll();
// // Get.back();
// // }).catchError((error) {
// // // 处理弹窗显示错误的逻辑
// // print("弹窗显示失败: $error");
// // });
// // }
// // });
// },
// text: '确定',
// options: FFButtonOptions(
// height: 40,
// padding:
// EdgeInsetsDirectional.fromSTEB(24, 0, 24, 0),
// iconPadding:
// EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0),
// color: Color(0xFFD3B684),
// textStyle: FlutterFlowTheme.of(context)
// .titleSmall
// .override(
// fontFamily: 'Readex Pro',
// color: Colors.white,
// fontSize: 13,
// letterSpacing: 0,
// ),
// elevation: 0,
// borderSide: BorderSide(
// color: Colors.transparent,
// width: 1,
// ),
// borderRadius: BorderRadius.circular(8),
// ),
// ),
// ),
child: CustomCard(
borderRadius: 16.rpx,
gradientDirection: GradientDirection.vertical,
onTap: () {
Get.toNamed("/applyRepairPage");
},
colors: const [
Color(0xFFFCFCFC),
Color(0xFFF8FAF9),
Color(0XFFECF6F3),
Color(0XFFD9F0E9),
Color(0xFFCEECE3)
],
child: Container(
width: double.infinity,
height: 90.rpx,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16.rpx),
),
child: Text(
"提交",
style: TextStyle(
fontFamily: 'Readex Pro',
color: stringToColor("#011D33"),
letterSpacing: 0,
fontSize: 30.rpx,
),
),
child: Text(
"提交",
style: TextStyle(
fontFamily: 'Readex Pro',
color: stringToColor("#011D33"),
letterSpacing: 0,
fontSize: 30.rpx,
),
)),
),
],
),
),
)),
),
),
],
),
));
),
),
));
});
}
}

View File

@@ -17,7 +17,7 @@ class _SleepHabitPageState extends State<SleepHabitPage> {
return LayoutBuilder(builder: (context, cc) {
bodysize = cc;
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(

View File

@@ -38,299 +38,294 @@ class Smys extends GetView<SleepingHabitController> {
return LayoutBuilder(
builder: (context, boxConstraints) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
// leading: returnIconButtomAddCallback(() {
// controller.saveDataApi();
// updateParm(isShowToast: false);
// }),
// leading: returnIconButtomNew,
title: Container(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'睡眠隐私'.tr,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
// leading: returnIconButtomAddCallback(() {
// controller.saveDataApi();
// updateParm(isShowToast: false);
// }),
// leading: returnIconButtomNew,
title: Container(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
actions: [],
centerTitle: false,
),
body: SafeArea(
top: true,
child: Obx(
() => Container(
padding: EdgeInsets.only(left: 30.rpx, right: 30.rpx),
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height * 1.123,
// decoration: BoxDecoration(
// color: Colors.transparent,
// image: DecorationImage(
// image: AssetImage("assets/images/background.png"),
// fit: BoxFit.cover,
// ),
// ),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
// 中间居中的标题
Text(
'睡眠隐私'.tr,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
actions: [],
centerTitle: false,
),
body: SafeArea(
top: true,
child: Obx(
() => Container(
padding: EdgeInsets.only(left: 30.rpx, right: 30.rpx),
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height * 1.123,
// decoration: BoxDecoration(
// color: Colors.transparent,
// image: DecorationImage(
// image: AssetImage("assets/images/background.png"),
// fit: BoxFit.cover,
// ),
// ),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: double.infinity,
height: MediaQuery.sizeOf(context).height * 0.055,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: const Color(0xFF929699),
width: 0.rpx),
),
),
constraints: BoxConstraints(
minHeight: 90.rpx, // 设置最小高度
),
child: Padding(
padding: EdgeInsets.fromLTRB(
39.rpx, 0.rpx, 15.rpx, 0.rpx),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'睡眠隐私功能'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF9EA4B7),
fontSize: 26.rpx,
letterSpacing: 0,
),
),
Container(
// height:
// MediaQuery.sizeOf(context).height *
// 0.04,
child: FlutterSwitch(
width: 70.rpx,
height: 36.rpx,
toggleSize: 30.rpx,
activeColor: Color(0XFF6BFDAC),
inactiveColor: Color(0XFF003058),
toggleColor: Color(0xFF011D33),
value: controller.model.smysIsStart,
onToggle: (val) {
controller.attr.update((getmodel) {
getmodel.model.smysIsStart = val;
});
},
)),
],
),
)),
// getLine(),
InkWell(
onTap: () async {
showDayTimeSelectionDialog(context,
dayTimeArr: controller.model.smysStartTime,
title: "开始时间".tr, checkChange: (d) {
controller.attr.update((getmodel) {
getmodel.model.smysStartTime = [
int.parse("${d[0]}"),
int.parse("${d[1]}")
];
});
// updateParm();
});
},
child: Container(
width: double.infinity,
height:
MediaQuery.sizeOf(context).height * 0.055,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color(0xFF929699),
// color: Colors.red,
width: 0.rpx),
Container(
width: double.infinity,
height: MediaQuery.sizeOf(context).height * 0.055,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: const Color(0xFF929699), width: 0.rpx),
),
),
constraints: BoxConstraints(
minHeight: 90.rpx, // 设置最小高度
),
child: Padding(
padding: EdgeInsets.fromLTRB(
39.rpx, 0.rpx, 15.rpx, 0.rpx),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'睡眠隐私功能'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF9EA4B7),
fontSize: 26.rpx,
letterSpacing: 0,
),
),
constraints: BoxConstraints(
minHeight: 90.rpx, // 设置最小高度
),
child: Padding(
padding: EdgeInsets.fromLTRB(
39.rpx, 0.rpx, 30.rpx, 0.rpx),
child: Row(
Container(
// height:
// MediaQuery.sizeOf(context).height *
// 0.04,
child: FlutterSwitch(
width: 70.rpx,
height: 36.rpx,
toggleSize: 30.rpx,
activeColor: Color(0XFF6BFDAC),
inactiveColor: Color(0XFF003058),
toggleColor: Color(0xFF011D33),
value: controller.model.smysIsStart,
onToggle: (val) {
controller.attr.update((getmodel) {
getmodel.model.smysIsStart = val;
});
},
)),
],
),
)),
// getLine(),
InkWell(
onTap: () async {
showDayTimeSelectionDialog(context,
dayTimeArr: controller.model.smysStartTime,
title: "开始时间".tr, checkChange: (d) {
controller.attr.update((getmodel) {
getmodel.model.smysStartTime = [
int.parse("${d[0]}"),
int.parse("${d[1]}")
];
});
// updateParm();
});
},
child: Container(
width: double.infinity,
height: MediaQuery.sizeOf(context).height * 0.055,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color(0xFF929699),
// color: Colors.red,
width: 0.rpx),
),
),
constraints: BoxConstraints(
minHeight: 90.rpx, // 设置最小高度
),
child: Padding(
padding: EdgeInsets.fromLTRB(
39.rpx, 0.rpx, 30.rpx, 0.rpx),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'开始时间'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF9EA4B7),
fontSize: 26.rpx,
letterSpacing: 0,
),
),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'开始时间'.tr,
"${controller.model.smysStartTimeToString}",
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF9EA4B7),
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
),
Row(
mainAxisSize: MainAxisSize.max,
children: [
Text(
"${controller.model.smysStartTimeToString}",
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
),
SizedBox(
width: 16.rpx,
),
Container(
height: 30.rpx,
width: 30.rpx,
child: SvgPicture.asset(
'assets/img/icon/expand_more.svg',
color: Colors.white,
))
],
SizedBox(
width: 16.rpx,
),
Container(
height: 30.rpx,
width: 30.rpx,
child: SvgPicture.asset(
'assets/img/icon/expand_more.svg',
color: Colors.white,
))
],
),
)),
],
),
)),
),
// getLine(),
InkWell(
onTap: () async {
showDayTimeSelectionDialog(context,
dayTimeArr: controller.model.smysEndTime,
title: "结束时间".tr, checkChange: (d) {
controller.attr.update((getmodel) {
getmodel.model.smysEndTime = [
int.parse("${d[0]}"),
int.parse("${d[1]}")
];
});
// updateParm();
});
},
child: Container(
width: double.infinity,
height: MediaQuery.sizeOf(context).height * 0.055,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: const Color(0xFF929699), width: 0.rpx),
),
),
// getLine(),
InkWell(
onTap: () async {
showDayTimeSelectionDialog(context,
dayTimeArr: controller.model.smysEndTime,
title: "结束时间".tr, checkChange: (d) {
controller.attr.update((getmodel) {
getmodel.model.smysEndTime = [
int.parse("${d[0]}"),
int.parse("${d[1]}")
];
});
// updateParm();
});
},
child: Container(
width: double.infinity,
height: MediaQuery.sizeOf(context).height * 0.055,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: const Color(0xFF929699),
width: 0.rpx),
constraints: BoxConstraints(
minHeight: 90.rpx, // 设置最小高度
),
child: Padding(
padding: EdgeInsets.fromLTRB(
39.rpx, 0.rpx, 30.rpx, 0.rpx),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'结束时间'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF9EA4B7),
fontSize: 26.rpx,
letterSpacing: 0,
),
),
),
constraints: BoxConstraints(
minHeight: 90.rpx, // 设置最小高度
),
child: Padding(
padding: EdgeInsets.fromLTRB(
39.rpx, 0.rpx, 30.rpx, 0.rpx),
child: Row(
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'结束时间'.tr,
"${controller.model.smysEndTimeToString}",
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF9EA4B7),
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
),
Row(
mainAxisSize: MainAxisSize.max,
children: [
Text(
"${controller.model.smysEndTimeToString}",
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
),
SizedBox(
width: 16.rpx,
),
Container(
height: 30.rpx,
width: 30.rpx,
child: SvgPicture.asset(
'assets/img/icon/expand_more.svg',
color: Colors.white,
))
],
SizedBox(
width: 16.rpx,
),
Container(
height: 30.rpx,
width: 30.rpx,
child: SvgPicture.asset(
'assets/img/icon/expand_more.svg',
color: Colors.white,
))
],
),
),
],
),
), // getLine(),
SizedBox(
height: 30.rpx,
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 25.rpx),
child: Container(
width: double.infinity,
decoration: BoxDecoration(),
child: Text(
'*注:开启睡眠隐私功能后,在设置的时间段内,将不会采集您的睡眠数据。'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF9EA4B7),
fontSize: 20.rpx,
letterSpacing: 0,
),
),
),
)
],
),
), // getLine(),
SizedBox(
height: 30.rpx,
),
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 25.rpx),
child: Container(
width: double.infinity,
decoration: BoxDecoration(),
child: Text(
'*注:开启睡眠隐私功能后,在设置的时间段内,将不会采集您的睡眠数据。'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF9EA4B7),
fontSize: 20.rpx,
letterSpacing: 0,
),
),
),
)
],
),
),
),
),
)),
),
),
)),
);
}
}

View File

@@ -49,7 +49,7 @@ class _UpdateUserPageState extends State<EditUserPage> {
int login = userInfoController.model.login!;
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(

File diff suppressed because it is too large Load Diff

View File

@@ -134,7 +134,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
return LayoutBuilder(builder: (context, cc) {
bodysize = cc;
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
@@ -1458,7 +1458,8 @@ class MHTLoginPage extends GetView<MHTLoginController> {
color:
stringToColor(
"FF9F66"),
fontSize: 23.rpx,
fontSize:
23.rpx,
letterSpacing:
0,
),
@@ -1504,7 +1505,8 @@ class MHTLoginPage extends GetView<MHTLoginController> {
color:
stringToColor(
"FF9F66"),
fontSize: 23.rpx,
fontSize:
23.rpx,
letterSpacing:
0,
),

View File

@@ -181,59 +181,200 @@ class _RxhxMhtState extends State<RxhxMht> {
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, boxConstraints) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: const IconThemeData(color: Colors.white),
titleSpacing: 0,
title: Container(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'柔性唤醒',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: const IconThemeData(color: Colors.white),
titleSpacing: 0,
title: Container(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
// 中间居中的标题
Text(
'柔性唤醒',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
actions: [],
centerTitle: false,
),
body: SafeArea(
top: true,
child: Obx(
() => Container(
padding: EdgeInsets.only(left: 30.rpx, right: 30.rpx),
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height * 1.123,
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
margin: EdgeInsets.only(left: 40.rpx, right: 16.rpx),
width: double.infinity,
height: 90.rpx,
decoration: const BoxDecoration(),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'柔性唤醒功能',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
),
Container(
// height:
// MediaQuery.sizeOf(context).height *
// 0.04,
child: FlutterSwitch(
width: 70.rpx,
height: 36.rpx,
toggleSize: 30.rpx,
activeColor: Color(0XFF6BFDAC),
inactiveColor: Color(0XFF003058),
toggleColor: Color(0xFF011D33),
value: controller.model.smysIsStart,
onToggle: (val) {
controller.attr.update((getmodel) {
getmodel.model.smysIsStart = val;
});
},
)),
// Container(
// height:
// MediaQuery.sizeOf(context).height * 0.04,
// child: Switch.adaptive(
// value: controller.model.rxhxIsStart,
// onChanged: (newValue) async {
// controller.attr.update((getmodel) {
// getmodel.model.rxhxIsStart = newValue;
// });
// },
// activeTrackColor: const Color(0xFFD3B684),
// inactiveTrackColor: const Color(0xFF0A1562),
// inactiveThumbColor: const Color(0xFF182B7C),
// trackOutlineWidth: MaterialStateProperty
// .resolveWith<double?>(
// (Set<MaterialState> states) {
// if (states
// .contains(MaterialState.disabled)) {
// return null;
// }
// return null; // Use the default width.
// }),
// ),
// ),
],
),
),
getLine(),
InkWell(
onTap: () async {
showDayTimeSelectionDialog(context,
dayTimeArr: controller.model.rxhxWakeTime,
title: "唤醒时间", checkChange: (d) {
controller.attr.update((getmodel) {
getmodel.model.rxhxWakeTime = [
int.parse("${d[0]}"),
int.parse("${d[1]}")
];
});
print("$d");
});
},
child: Container(
margin: EdgeInsets.only(left: 40.rpx, right: 30.rpx),
width: double.infinity,
height: 90.rpx,
decoration: const BoxDecoration(),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'唤醒时间',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
),
Row(
mainAxisSize: MainAxisSize.max,
children: [
Text(
"${controller.model.rxhxWakeTimeToString}",
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
),
SizedBox(
width: 16.rpx,
),
Container(
height: 30.rpx,
width: 30.rpx,
child: SvgPicture.asset(
'assets/img/icon/expand_more.svg',
color: Colors.white,
))
],
),
],
),
),
// 左侧图标
Positioned(
left: 0.rpx,
child: returnIconButtomNew,
),
],
),
),
actions: [],
centerTitle: false,
),
body: SafeArea(
top: true,
child: Obx(
() => Container(
padding: EdgeInsets.only(left: 30.rpx, right: 30.rpx),
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height * 1.123,
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
margin: EdgeInsets.only(left: 40.rpx, right: 16.rpx),
),
getLine(),
InkWell(
onTap: () {
showOneSelectionDialog(
context,
arr: ['', ""],
checkIndex: controller.model.rxhxIsAnMo ? 0 : 1,
title: "按摩",
checkChange: (index) {
controller.attr.update((getmodel) {
getmodel.model.rxhxIsAnMo =
index == 0 ? true : false;
});
},
);
},
child: Container(
margin: EdgeInsets.only(left: 40.rpx, right: 30.rpx),
width: double.infinity,
height: 90.rpx,
decoration: const BoxDecoration(),
@@ -242,7 +383,7 @@ class _RxhxMhtState extends State<RxhxMht> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'柔性唤醒功能',
'按摩',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
@@ -250,255 +391,59 @@ class _RxhxMhtState extends State<RxhxMht> {
letterSpacing: 0,
),
),
Container(
// height:
// MediaQuery.sizeOf(context).height *
// 0.04,
child: FlutterSwitch(
width: 70.rpx,
height: 36.rpx,
toggleSize: 30.rpx,
activeColor: Color(0XFF6BFDAC),
inactiveColor: Color(0XFF003058),
toggleColor: Color(0xFF011D33),
value: controller.model.smysIsStart,
onToggle: (val) {
controller.attr.update((getmodel) {
getmodel.model.smysIsStart = val;
});
},
)),
// Container(
// height:
// MediaQuery.sizeOf(context).height * 0.04,
// child: Switch.adaptive(
// value: controller.model.rxhxIsStart,
// onChanged: (newValue) async {
// controller.attr.update((getmodel) {
// getmodel.model.rxhxIsStart = newValue;
// });
// },
// activeTrackColor: const Color(0xFFD3B684),
// inactiveTrackColor: const Color(0xFF0A1562),
// inactiveThumbColor: const Color(0xFF182B7C),
// trackOutlineWidth: MaterialStateProperty
// .resolveWith<double?>(
// (Set<MaterialState> states) {
// if (states
// .contains(MaterialState.disabled)) {
// return null;
// }
// return null; // Use the default width.
// }),
// ),
// ),
Row(
mainAxisSize: MainAxisSize.max,
children: [
Text(
controller.model.rxhxIsAnMo ? '' : '',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
),
SizedBox(
width: 16.rpx,
),
Container(
height: 30.rpx,
width: 30.rpx,
child: SvgPicture.asset(
'assets/img/icon/expand_more.svg',
color: Colors.white,
))
],
),
],
),
),
getLine(),
InkWell(
onTap: () async {
showDayTimeSelectionDialog(context,
dayTimeArr: controller.model.rxhxWakeTime,
title: "唤醒时间", checkChange: (d) {
controller.attr.update((getmodel) {
getmodel.model.rxhxWakeTime = [
int.parse("${d[0]}"),
int.parse("${d[1]}")
];
});
print("$d");
)),
),
getLine(),
InkWell(
onTap: () {
showOneSelectionDialog(
context,
arr: location,
checkIndex: controller.model.rxhxLocation,
title: "唤醒部位",
checkChange: (index) {
controller.attr.update((getmodel) {
getmodel.model.rxhxLocation = index;
});
},
child: Container(
margin:
EdgeInsets.only(left: 40.rpx, right: 30.rpx),
width: double.infinity,
height: 90.rpx,
decoration: const BoxDecoration(),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'唤醒时间',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
),
Row(
mainAxisSize: MainAxisSize.max,
children: [
Text(
"${controller.model.rxhxWakeTimeToString}",
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
),
SizedBox(
width: 16.rpx,
),
Container(
height: 30.rpx,
width: 30.rpx,
child: SvgPicture.asset(
'assets/img/icon/expand_more.svg',
color: Colors.white,
))
],
),
],
),
),
),
getLine(),
InkWell(
onTap: () {
showOneSelectionDialog(
context,
arr: ['', ""],
checkIndex: controller.model.rxhxIsAnMo ? 0 : 1,
title: "按摩",
checkChange: (index) {
controller.attr.update((getmodel) {
getmodel.model.rxhxIsAnMo =
index == 0 ? true : false;
});
},
);
},
child: Container(
margin:
EdgeInsets.only(left: 40.rpx, right: 30.rpx),
width: double.infinity,
height: 90.rpx,
decoration: const BoxDecoration(),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'按摩',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
),
Row(
mainAxisSize: MainAxisSize.max,
children: [
Text(
controller.model.rxhxIsAnMo ? '' : '',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
),
SizedBox(
width: 16.rpx,
),
Container(
height: 30.rpx,
width: 30.rpx,
child: SvgPicture.asset(
'assets/img/icon/expand_more.svg',
color: Colors.white,
))
],
),
],
)),
),
getLine(),
InkWell(
onTap: () {
showOneSelectionDialog(
context,
arr: location,
checkIndex: controller.model.rxhxLocation,
title: "唤醒部位",
checkChange: (index) {
controller.attr.update((getmodel) {
getmodel.model.rxhxLocation = index;
});
},
);
},
child: Container(
margin:
EdgeInsets.only(left: 40.rpx, right: 30.rpx),
width: double.infinity,
height: 90.rpx,
decoration: const BoxDecoration(),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'唤醒部位',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
),
Row(
mainAxisSize: MainAxisSize.max,
children: [
Text(
location[controller.model.rxhxLocation],
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
),
SizedBox(
width: 16.rpx,
),
Container(
height: 30.rpx,
width: 30.rpx,
child: SvgPicture.asset(
'assets/img/icon/expand_more.svg',
color: Colors.white,
))
],
),
],
)),
),
getLine(),
Container(
margin: EdgeInsets.only(
top: 30.rpx,
bottom: 30.rpx,
left: 40.rpx,
right: 30.rpx),
);
},
child: Container(
margin: EdgeInsets.only(left: 40.rpx, right: 30.rpx),
width: double.infinity,
height: 90.rpx,
decoration: const BoxDecoration(),
child: Column(
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'自定义',
'唤醒部位',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
@@ -506,175 +451,220 @@ class _RxhxMhtState extends State<RxhxMht> {
letterSpacing: 0,
),
),
// Padding(
// padding: EdgeInsetsDirectional.fromSTEB(
// 0, 20.rpx, 0, 0),
// child: Container(
// width: double.infinity,
// height:
// MediaQuery.sizeOf(context).height * 0.046,
// decoration: const BoxDecoration(),
// child: Row(
// mainAxisSize: MainAxisSize.max,
// mainAxisAlignment:
// MainAxisAlignment.spaceBetween,
// children: [
// ...List.generate(7, (index) {
// return InkWell(
// onTap: () {
// controller.attr.update((getmodel) {
// getmodel.model
// .rxhxWeeks[index] = getmodel
// .model
// .rxhxWeeks[index] ==
// 0
// ? 1
// : 0;
// });
// },
// child: AspectRatio(
// aspectRatio: 1,
// child: ClipOval(
// child: Container(
// height: double.infinity,
// decoration: BoxDecoration(
// color: controller.model
// .rxhxWeeks[
// index] ==
// 1
// ? Color(0xFF84F5FF)
// : Color(0XFF003058)),
// child: Center(
// child: Text(
// weeks[index],
// style: TextStyle(
// color: controller.model
// .rxhxWeeks[
// index] ==
// 1
// ? Color(0XFF003058)
// : Colors.white),
// ),
// ),
// ),
// ),
// ),
// );
// }),
// ],
// ),
// ),
// ),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0, 20.rpx, 0, 0),
child: SizedBox(
width: double.infinity,
height:
MediaQuery.sizeOf(context).height * 0.046,
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: List.generate(7, (index) {
final bool selected =
controller.model.rxhxWeeks[index] ==
1;
return InkWell(
onTap: () {
controller.attr.update((getmodel) {
getmodel.model.rxhxWeeks[index] =
getmodel.model
.rxhxWeeks[index] ==
0
? 1
: 0;
});
},
borderRadius: BorderRadius.circular(
50), // 点击水波圆角区域
child: Container(
width: MediaQuery.sizeOf(context)
.height *
0.046, // 保证是正圆
height: MediaQuery.sizeOf(context)
.height *
0.046,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: selected
? const Color(0xFF84F5FF)
: const Color(0xFF003058),
),
alignment: Alignment.center,
child: Text(
weeks[index],
style: TextStyle(
color: selected
? const Color(0xFF003058)
: Colors.white,
),
),
),
);
}),
Row(
mainAxisSize: MainAxisSize.max,
children: [
Text(
location[controller.model.rxhxLocation],
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
),
),
)
SizedBox(
width: 16.rpx,
),
Container(
height: 30.rpx,
width: 30.rpx,
child: SvgPicture.asset(
'assets/img/icon/expand_more.svg',
color: Colors.white,
))
],
),
],
),
),
getLine(),
SizedBox(
height: 30.rpx,
),
Container(
margin: EdgeInsets.only(left: 26.rpx, right: 26.rpx),
width: double.infinity,
decoration: const BoxDecoration(),
child: Text(
'*注:开启该功能后,在设置的时间点,设备将启动一段固定时长的柔性唤醒功能。',
)),
),
getLine(),
Container(
margin: EdgeInsets.only(
top: 30.rpx,
bottom: 30.rpx,
left: 40.rpx,
right: 30.rpx),
width: double.infinity,
decoration: const BoxDecoration(),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'自定义',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF929699),
fontSize: 20.rpx,
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
),
),
Spacer(),
Padding(
padding: EdgeInsets.only(bottom: 85.rpx),
child: CustomCard(
borderRadius: 16.rpx,
gradientDirection: GradientDirection.vertical,
onTap: () {},
colors: const [
Color(0xFFFCFCFC),
Color(0xFFF8FAF9),
Color(0XFFECF6F3),
Color(0XFFD9F0E9),
Color(0xFFCEECE3)
],
child: Container(
width: double.infinity,
height: 90.rpx,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
),
child: Text("完成",
style: TextStyle(
color: const Color(0xFF003058),
fontSize: 26.rpx)),
// Padding(
// padding: EdgeInsetsDirectional.fromSTEB(
// 0, 20.rpx, 0, 0),
// child: Container(
// width: double.infinity,
// height:
// MediaQuery.sizeOf(context).height * 0.046,
// decoration: const BoxDecoration(),
// child: Row(
// mainAxisSize: MainAxisSize.max,
// mainAxisAlignment:
// MainAxisAlignment.spaceBetween,
// children: [
// ...List.generate(7, (index) {
// return InkWell(
// onTap: () {
// controller.attr.update((getmodel) {
// getmodel.model
// .rxhxWeeks[index] = getmodel
// .model
// .rxhxWeeks[index] ==
// 0
// ? 1
// : 0;
// });
// },
// child: AspectRatio(
// aspectRatio: 1,
// child: ClipOval(
// child: Container(
// height: double.infinity,
// decoration: BoxDecoration(
// color: controller.model
// .rxhxWeeks[
// index] ==
// 1
// ? Color(0xFF84F5FF)
// : Color(0XFF003058)),
// child: Center(
// child: Text(
// weeks[index],
// style: TextStyle(
// color: controller.model
// .rxhxWeeks[
// index] ==
// 1
// ? Color(0XFF003058)
// : Colors.white),
// ),
// ),
// ),
// ),
// ),
// );
// }),
// ],
// ),
// ),
// ),
Padding(
padding:
EdgeInsetsDirectional.fromSTEB(0, 20.rpx, 0, 0),
child: SizedBox(
width: double.infinity,
height: MediaQuery.sizeOf(context).height * 0.046,
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: List.generate(7, (index) {
final bool selected =
controller.model.rxhxWeeks[index] == 1;
return InkWell(
onTap: () {
controller.attr.update((getmodel) {
getmodel.model.rxhxWeeks[index] =
getmodel.model.rxhxWeeks[index] == 0
? 1
: 0;
});
},
borderRadius:
BorderRadius.circular(50), // 点击水波圆角区域
child: Container(
width: MediaQuery.sizeOf(context).height *
0.046, // 保证是正圆
height:
MediaQuery.sizeOf(context).height *
0.046,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: selected
? const Color(0xFF84F5FF)
: const Color(0xFF003058),
),
alignment: Alignment.center,
child: Text(
weeks[index],
style: TextStyle(
color: selected
? const Color(0xFF003058)
: Colors.white,
),
),
),
);
}),
),
))
],
),
)
],
),
),
),
getLine(),
SizedBox(
height: 30.rpx,
),
Container(
margin: EdgeInsets.only(left: 26.rpx, right: 26.rpx),
width: double.infinity,
decoration: const BoxDecoration(),
child: Text(
'*注:开启该功能后,在设置的时间点,设备将启动一段固定时长的柔性唤醒功能。',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF929699),
fontSize: 20.rpx,
letterSpacing: 0,
),
),
),
Spacer(),
Padding(
padding: EdgeInsets.only(bottom: 85.rpx),
child: CustomCard(
borderRadius: 16.rpx,
gradientDirection: GradientDirection.vertical,
onTap: () {},
colors: const [
Color(0xFFFCFCFC),
Color(0xFFF8FAF9),
Color(0XFFECF6F3),
Color(0XFFD9F0E9),
Color(0xFFCEECE3)
],
child: Container(
width: double.infinity,
height: 90.rpx,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
),
child: Text("完成",
style: TextStyle(
color: const Color(0xFF003058),
fontSize: 26.rpx)),
),
))
],
),
),
),
)),
),
),
)),
);
}
}

View File

@@ -33,7 +33,7 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
return LayoutBuilder(builder: (context, cc) {
bodysize = cc;
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
@@ -42,7 +42,7 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
),
),
child: Scaffold(
// key: scaffoldKey,
// key: scaffoldKey,
appBar: AppBar(
backgroundColor: Colors.transparent,
// backgroundColor: Colors.transparent,
@@ -601,7 +601,7 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
UnderlineInputBorder(
borderSide:
BorderSide(
color: Colors.red,
color: Colors.red,
width: 2,
),
borderRadius:
@@ -753,7 +753,7 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
UnderlineInputBorder(
borderSide:
BorderSide(
color: Colors.red,
color: Colors.red,
width: 2,
),
borderRadius:

View File

@@ -41,7 +41,7 @@ class _UserAgreementPageState extends State<UserAgreementPage> {
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(

View File

@@ -61,7 +61,7 @@ class _EPageState extends State<PersonPage> {
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(

View File

@@ -57,7 +57,7 @@ class _UpdatePageState extends State<UpdatePersonPage> {
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(

View File

@@ -89,7 +89,7 @@ class _ApplyRepairPageState extends State<ApplyRepairPage> {
}
return LayoutBuilder(
builder: (context, bodysize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(

View File

@@ -33,7 +33,7 @@ class _ApplyRepairSuccessState extends State<ApplyRepairSuccess> {
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(

View File

@@ -65,7 +65,7 @@ class _RepairDetailPageState extends State<RepairDetailPage> {
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(

View File

@@ -35,7 +35,7 @@ class _RepairListPageState extends State<RepairListPage> {
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(

View File

@@ -116,7 +116,7 @@ class _CommonMessageSettingPageState extends State<CommonMessageSettingPage> {
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(

View File

@@ -29,7 +29,7 @@ class _LanguageSettingState extends State<LanguageSetting> {
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(

View File

@@ -214,7 +214,7 @@ class BarChartPainter extends CustomPainter {
// 缓存 tip 信息
if (selectedBar == d) {
tipText =
'${d.name}\n${d.value.toStringAsFixed(1)}\n${MyUtils.formatToHHmm(d.st)}';
'${d.name}\n${d.value.toStringAsFixed(1)}\n${MyUtils.formatToHHmm(d.st)}';
final tp = TextPainter(
text: TextSpan(

View File

@@ -84,9 +84,28 @@ class TimeSeriesChart extends StatelessWidget {
final xLabels = _generateXLabels();
final midY = (yMin + yMax) / 2;
List<FlSpot> spots = dataPoints.map((p) {
return FlSpot(_timeToX(p.timestamp.toDouble(), xLabels), p.value);
}).toList();
// 将数据点分割成多个连续段遇到value=-1时断开
List<List<FlSpot>> lineSegments = [];
List<FlSpot> currentSegment = [];
for (var point in dataPoints) {
if (point.value != -1) {
// 有效数据点,添加到当前段
currentSegment.add(FlSpot(
_timeToX(point.timestamp.toDouble(), xLabels),
point.value,
));
} else if (currentSegment.isNotEmpty) {
// 遇到无效点且当前段不为空,结束当前段
lineSegments.add(currentSegment);
currentSegment = [];
}
}
// 添加最后一个段(如果有)
if (currentSegment.isNotEmpty) {
lineSegments.add(currentSegment);
}
return AspectRatio(
aspectRatio: 2,
@@ -204,15 +223,16 @@ class TimeSeriesChart extends StatelessWidget {
top: BorderSide.none,
),
),
lineBarsData: [
LineChartBarData(
spots: spots,
lineBarsData: lineSegments.map((segment) {
return LineChartBarData(
spots: segment,
isCurved: false,
color: themeController.currentColor.sc2,
barWidth: 2,
dotData: FlDotData(show: false),
)
],
preventCurveOverShooting: true,
);
}).toList(),
),
),
);

View File

@@ -47,11 +47,21 @@ class _BreatheStandardWidgetState extends State<BreatheStandardWidget> {
final endTime = widget.sleepReport['endTime'];
List<Map<String, dynamic>> data =
(widget.sleepReport['brbc'] as List).cast<Map<String, dynamic>>();
final dataPoints = data.map((item) {
final x = item['st'] as int;
final y = (item['value'] as num).toDouble(); // 安全地转换为 double
return TimeSeriesPoint(x, y);
}).toList();
List<TimeSeriesPoint> dataPoints = [];
if (data != null && data.isNotEmpty) {
data.forEach((item) {
final x = item['st'] as int;
if (item['value'] == null || item['value'] == '') {
// return;
dataPoints.add(TimeSeriesPoint(x, -1));
return;
}
final y = (item['value'] as num).toDouble(); // 安全地转换为 double
// return TimeSeriesPoint(x, y);
dataPoints.add(TimeSeriesPoint(x, y));
});
}
List<Map<String, dynamic>> brs =
(widget.sleepReport['brs'] as List).cast<Map<String, dynamic>>();
@@ -130,7 +140,8 @@ class _BreatheStandardWidgetState extends State<BreatheStandardWidget> {
Container(
child: Text(
// "呼吸数据介绍".tr,
"呼吸数据是指用户在睡眠过程中呼吸的基本数据,是评估睡眠呼吸质量、筛查睡眠呼吸障碍的核心指标。".tr,
"呼吸数据是指用户在睡眠过程中呼吸的基本数据,是评估睡眠呼吸质量、筛查睡眠呼吸障碍的核心指标。"
.tr,
style: TextStyle(
fontSize: 26.rpx,
color: themeController.currentColor.sc3,

View File

@@ -10,6 +10,7 @@ import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
import 'package:vbvs_app/pages/sleep_report/chart/TimeSeriesChart.dart';
import 'package:EasyDartModule/EasyDartModule.dart' as es;
//心率基准
class HeartRateStandardWidget extends StatefulWidget {
var sleepReport;
HeartRateStandardWidget({super.key, required this.sleepReport});
@@ -48,11 +49,21 @@ class _HeartRateStandardWidgetState extends State<HeartRateStandardWidget> {
final endTime = widget.sleepReport['endTime'];
List<Map<String, dynamic>> data =
(widget.sleepReport['hrbc'] as List).cast<Map<String, dynamic>>();
final dataPoints = data.map((item) {
final x = item['st'] as int;
final y = (item['value'] as num).toDouble(); // 安全地转换为 double
return TimeSeriesPoint(x, y);
}).toList();
List<TimeSeriesPoint> dataPoints = [];
if (data != null && data.isNotEmpty) {
data.forEach((item) {
final x = item['st'] as int;
if (item['value'] == null || item['value'] == '') {
// return;
dataPoints.add(TimeSeriesPoint(x, -1));
return;
}
final y = (item['value'] as num).toDouble(); // 安全地转换为 double
// return TimeSeriesPoint(x, y);
dataPoints.add(TimeSeriesPoint(x, y));
});
}
List<Map<String, dynamic>> hrs =
(widget.sleepReport['hrs'] as List).cast<Map<String, dynamic>>();
@@ -129,7 +140,8 @@ class _HeartRateStandardWidgetState extends State<HeartRateStandardWidget> {
Container(
child: Text(
// "心率数据介绍".tr,
"心率数据是指用户在睡眠过程中基本心率数据,可初步判断睡眠中的心血管负荷及自主神经功能状态,为睡眠健康评估提供重要依据。".tr,
"心率数据是指用户在睡眠过程中基本心率数据,可初步判断睡眠中的心血管负荷及自主神经功能状态,为睡眠健康评估提供重要依据。"
.tr,
style: TextStyle(
fontSize: 26.rpx,
color: themeController.currentColor.sc3,
@@ -376,7 +388,7 @@ class _HeartRateStandardWidgetState extends State<HeartRateStandardWidget> {
),
);
} catch (e) {
es.EasyDartModule.logger.error("打鼾监测绘制异常${e}");
es.EasyDartModule.logger.error("心率基准绘制异常${e}");
return Container();
}
}

View File

@@ -138,7 +138,7 @@ class _MHTNewSleepReportPageState extends State<MHTNewSleepReportPage> {
double lineWidth = 115.rpx;
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(

View File

@@ -88,7 +88,7 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
double lineWidth = 115.rpx;
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(

View File

@@ -153,7 +153,7 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
double lineWidth = 115.rpx;
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: (widget.data['noBackImg'] != null &&

View File

@@ -42,7 +42,7 @@ class _SleepReportPageState extends State<SleepReportPage> {
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(
@@ -67,11 +67,11 @@ class _SleepReportPageState extends State<SleepReportPage> {
Text(
'健康报告'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: themeController.currentColor.sc3,
letterSpacing: 0,
fontSize: 30.rpx,
),
fontFamily: 'Readex Pro',
color: themeController.currentColor.sc3,
letterSpacing: 0,
fontSize: 30.rpx,
),
),
/// 左边返回按钮
@@ -117,6 +117,4 @@ class _SleepReportPageState extends State<SleepReportPage> {
),
);
}
}

View File

@@ -20,8 +20,7 @@ class _AboutUsPageState extends State<AboutUsPage> {
// pdfController.loadPdf();
widget.webView = MyWebView(
url:
AppConstants().ent_type == 1
url: AppConstants().ent_type == 1
? "https://mp.weixin.qq.com/s/IAr4RNBy0hGJXGKyMxe7eQ"
: "https://mp.weixin.qq.com/s/7BvvprVDqX1eOzM3Lms8dg",
onLoad: () {
@@ -34,7 +33,7 @@ class _AboutUsPageState extends State<AboutUsPage> {
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(

View File

@@ -37,7 +37,7 @@ class _PrivacySchemePageState extends State<PrivacySchemePage> {
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(

View File

@@ -40,7 +40,7 @@ class _SettingPageState extends State<SettingPage> {
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(
@@ -577,8 +577,10 @@ class _SettingPageState extends State<SettingPage> {
),
),
Text(
AppConstants().ent_type == 1? 'Copyright © 202-2025 嘉兴太和信息技术有限责任公司 版权所有'
.tr:"Copyright © 202-2025 杭州欢睡科技有限公司 版权所有",
AppConstants().ent_type == 1
? 'Copyright © 202-2025 嘉兴太和信息技术有限责任公司 版权所有'
.tr
: "Copyright © 202-2025 杭州欢睡科技有限公司 版权所有",
style: TextStyle(
color: themeController.currentColor.sc4,
fontFamily: 'Inter',

View File

@@ -49,7 +49,7 @@ class _UpdateUserPageState extends State<UpdateUserPage> {
int login = userInfoController.model.login!;
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
@@ -290,12 +290,12 @@ class _UpdateUserPageState extends State<UpdateUserPage> {
filled: false,
),
style: TextStyle(
fontFamily: 'Inter',
fontSize: 26.rpx,
letterSpacing: 0.0,
color: themeController
.currentColor.sc3,
),
fontFamily: 'Inter',
fontSize: 26.rpx,
letterSpacing: 0.0,
color: themeController
.currentColor.sc3,
),
textAlign: TextAlign.center,
cursorColor: themeController
.currentColor.sc3,

View File

@@ -41,7 +41,7 @@ class _UserSchemePageState extends State<UserSchemePage> {
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(

View File

@@ -42,7 +42,7 @@ class _XiaoEPageState extends State<XiaoEPage> {
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(