This commit is contained in:
czz
2025-06-27 09:15:45 +08:00
parent 12c6a260c9
commit 943f5a778a
36 changed files with 1850 additions and 1355 deletions

View File

@@ -219,52 +219,6 @@ class _RxhxMhtState extends State<RxhxMht> {
],
),
),
// leading: returnIconButtomAddCallback(() {
// controller.saveDataApi();
// }),
// Container(
// width: double.infinity,
// height: 70.rpx,
// child: Row(
// mainAxisSize: MainAxisSize.max,
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Text(
// '柔性唤醒',
// style: TextStyle(
// fontFamily: 'Readex Pro',
// color: Colors.white,
// letterSpacing: 0,
// fontSize: 30.rpx),
// ),
// InkWell(
// onTap: () {
// alarmChange();
// },
// child: Container(
// margin: EdgeInsets.only(right: 30.rpx),
// width: 140.rpx,
// height: 66.rpx,
// alignment: Alignment.center,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(5),
// color: stringToColor("#182B7C")),
// child: Text(
// "保存",
// style: FlutterFlowTheme.of(context)
// .bodyMedium
// .override(
// fontFamily: 'Readex Pro',
// color: stringToColor("#9EA4B7"),
// letterSpacing: 0,
// fontSize: 30.rpx),
// ),
// ),
// )
// ],
// ),
// ),
actions: [],
centerTitle: false,
),
@@ -343,39 +297,40 @@ class _RxhxMhtState extends State<RxhxMht> {
),
),
getLine(),
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,
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,
),
),
),
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: Row(
Row(
mainAxisSize: MainAxisSize.max,
children: [
Text(
@@ -399,133 +354,134 @@ class _RxhxMhtState extends State<RxhxMht> {
))
],
),
),
],
],
),
),
),
getLine(),
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,
),
),
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: Row(
mainAxisSize: MainAxisSize.max,
children: [
Text(
controller.model.rxhxIsAnMo ? '' : '',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
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,
),
SizedBox(
width: 16.rpx,
),
Container(
height: 30.rpx,
width: 30.rpx,
child: SvgPicture.asset(
'assets/img/icon/expand_more.svg',
),
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(),
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,
),
),
InkWell(
onTap: () {
showOneSelectionDialog(
context,
arr: location,
checkIndex: controller.model.rxhxLocation,
title: "唤醒部位",
checkChange: (index) {
controller.attr.update((getmodel) {
getmodel.model.rxhxLocation = index;
});
},
);
},
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
Text(
location[controller.model.rxhxLocation],
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
fontSize: 26.rpx,
letterSpacing: 0,
),
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,
),
SizedBox(
width: 16.rpx,
),
Container(
height: 30.rpx,
width: 30.rpx,
child: SvgPicture.asset(
'assets/img/icon/expand_more.svg',
),
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(
@@ -550,65 +506,120 @@ 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: Container(
child: SizedBox(
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),
),
),
),
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,
),
),
);
}),
],
),
);
}),
),
),
),
)
],
),
),
@@ -624,7 +635,7 @@ class _RxhxMhtState extends State<RxhxMht> {
'*注:开启该功能后,在设置的时间点,设备将启动一段固定时长的柔性唤醒功能。',
style: TextStyle(
fontFamily: 'Readex Pro',
color: Colors.white,
color: Color(0xFF929699),
fontSize: 20.rpx,
letterSpacing: 0,
),