更新睡眠的心率基准图不显示
This commit is contained in:
@@ -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)),
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
),
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user