Merge remote-tracking branch 'origin/master'
This commit is contained in:
Binary file not shown.
@@ -237,7 +237,7 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodysize) => GestureDetector(
|
builder: (context, bodysize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -169,7 +169,6 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
|
|||||||
print(res);
|
print(res);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -181,7 +180,7 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodysize) => GestureDetector(
|
builder: (context, bodysize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class _DeviceDetailPageState extends State<DeviceDetailPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ class _InstantBodyPageState extends State<InstantBodyPage>
|
|||||||
|
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class _MessageReviewPageState extends State<MessageReviewPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodysize) => GestureDetector(
|
builder: (context, bodysize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class _AfterCalibrationPersonPageState
|
|||||||
return WillPopScope(
|
return WillPopScope(
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class _AfterUpdatePersonPageState extends State<AfterUpdatePersonPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class _AfterWifiPagePersonState extends State<AfterWifiPagePerson> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class _EPageState extends State<BindDeviceSuccess> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ class _BlueteethDevicePageState extends State<BlueteethDevicePage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, boxConstraints) => GestureDetector(
|
builder: (context, boxConstraints) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
|
|||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "查询用户消息配置",
|
logTitle: "查询用户消息配置",
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
if (res.data == null || res.data.isEmpty) {
|
if (res.data == null || res.data.isEmpty) {
|
||||||
var data = {
|
var data = {
|
||||||
@@ -169,7 +169,6 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
|
|||||||
print(res);
|
print(res);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -181,7 +180,7 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodysize) => GestureDetector(
|
builder: (context, bodysize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@@ -442,7 +441,9 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
AppConstants().ent_type == 1? "APP消息介绍".tr:"打开“欢睡科技”APP,可以查看该设备的消息内容",
|
AppConstants().ent_type == 1
|
||||||
|
? "APP消息介绍".tr
|
||||||
|
: "打开“欢睡科技”APP,可以查看该设备的消息内容",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc4,
|
color: themeController.currentColor.sc4,
|
||||||
fontSize: AppConstants()
|
fontSize: AppConstants()
|
||||||
@@ -548,7 +549,9 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
AppConstants().ent_type == 1? "服务号消息介绍".tr:"无需打开“欢睡科技”APP,关注欢睡智能睡眠研究所服务号后,微信内即可接收该设备消息推送",
|
AppConstants().ent_type == 1
|
||||||
|
? "服务号消息介绍".tr
|
||||||
|
: "无需打开“欢睡科技”APP,关注欢睡智能睡眠研究所服务号后,微信内即可接收该设备消息推送",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc4,
|
color: themeController.currentColor.sc4,
|
||||||
fontSize: AppConstants()
|
fontSize: AppConstants()
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
|||||||
return WillPopScope(
|
return WillPopScope(
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
|||||||
return WillPopScope(
|
return WillPopScope(
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
|
|||||||
return WillPopScope(
|
return WillPopScope(
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class _DeviceShareListPageState extends State<DeviceShareListPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, boxConstraints) => GestureDetector(
|
builder: (context, boxConstraints) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@@ -175,8 +175,7 @@ class _DeviceShareListPageState extends State<DeviceShareListPage> {
|
|||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: Colors.white,
|
||||||
Colors.white,
|
|
||||||
width: 1.rpx,
|
width: 1.rpx,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius:
|
||||||
@@ -185,8 +184,7 @@ class _DeviceShareListPageState extends State<DeviceShareListPage> {
|
|||||||
focusedErrorBorder:
|
focusedErrorBorder:
|
||||||
OutlineInputBorder(
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: Colors.white,
|
||||||
Colors.white,
|
|
||||||
width: 1.rpx,
|
width: 1.rpx,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius:
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class _DeviceSharePageState extends State<DeviceSharePage> {
|
|||||||
RxBool flag2 = false.obs;
|
RxBool flag2 = false.obs;
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -218,8 +218,7 @@ class _EPageState extends State<DeviceTypePage> {
|
|||||||
},
|
},
|
||||||
side: BorderSide(
|
side: BorderSide(
|
||||||
width: 1.5,
|
width: 1.5,
|
||||||
color:
|
color: Colors.white,
|
||||||
Colors.white,
|
|
||||||
),
|
),
|
||||||
activeColor:
|
activeColor:
|
||||||
stringToColor("#16C89F"),
|
stringToColor("#16C89F"),
|
||||||
@@ -295,7 +294,7 @@ class _EPageState extends State<DeviceTypePage> {
|
|||||||
}
|
}
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class _DeviceTypeListPageState extends State<DeviceTypeListPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class _WifiPageState extends State<WifiPage> {
|
|||||||
print("object");
|
print("object");
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@@ -516,7 +516,9 @@ class _WifiPageState extends State<WifiPage> {
|
|||||||
),
|
),
|
||||||
filled:
|
filled:
|
||||||
false,
|
false,
|
||||||
fillColor: Colors.white,
|
fillColor:
|
||||||
|
Colors
|
||||||
|
.white,
|
||||||
suffixIcon:
|
suffixIcon:
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap:
|
onTap:
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class _WifiPagePersonState extends State<WifiPagePerson> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@@ -459,7 +459,9 @@ class _WifiPagePersonState extends State<WifiPagePerson> {
|
|||||||
),
|
),
|
||||||
filled:
|
filled:
|
||||||
false,
|
false,
|
||||||
fillColor: Colors.white,
|
fillColor:
|
||||||
|
Colors
|
||||||
|
.white,
|
||||||
suffixIcon:
|
suffixIcon:
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap:
|
onTap:
|
||||||
|
|||||||
@@ -87,481 +87,467 @@ class _EPageState extends State<LoginPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodysize) => GestureDetector(
|
builder: (context, bodysize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/img/bgImage.png'), // 本地图片
|
image: AssetImage('assets/img/bgImage.png'), // 本地图片
|
||||||
fit: BoxFit.fill, // 填满整个 Container
|
fit: BoxFit.fill, // 填满整个 Container
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
top: true,
|
top: true,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: EdgeInsetsDirectional.fromSTEB(75.rpx, 0.rpx, 75.rpx, 0),
|
||||||
EdgeInsetsDirectional.fromSTEB(75.rpx, 0.rpx, 75.rpx, 0),
|
child: Column(
|
||||||
child: Column(
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisSize: MainAxisSize.max,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
|
Column(
|
||||||
children: [
|
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: [
|
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(
|
SizedBox(
|
||||||
height: 66.rpx,
|
height: 20.rpx,
|
||||||
),
|
),
|
||||||
ClickableContainer(
|
ClickableContainer(
|
||||||
backgroundColor: Colors.transparent, // 容器背景色
|
backgroundColor: Colors.transparent, // 容器背景色
|
||||||
highlightColor:
|
highlightColor:
|
||||||
themeController.currentColor.sc21, // 点击时的背景色
|
themeController.currentColor.sc21, // 点击时的背景色
|
||||||
padding:
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
EdgeInsets.zero, // 这里去掉外部的 padding,避免影响点击范围
|
16.rpx, 10.rpx, 16.rpx, 10.rpx),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.back();
|
print('点击了容器');
|
||||||
|
Get.toNamed("/otherLoginPage");
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: Text(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
'登录页.其他手机号码'.tr, // 子组件内容
|
||||||
16.rpx, 10.rpx, 16.rpx, 10.rpx),
|
style: TextStyle(
|
||||||
child: SvgPicture.asset(
|
fontFamily: 'Inter',
|
||||||
'assets/img/icon/close.svg',
|
fontSize: 26.rpx,
|
||||||
width: 25.rpx,
|
|
||||||
height: 25.rpx, // 如果 SVG 中没有固定颜色,使用 color 设置
|
|
||||||
color: themeController.currentColor.sc3,
|
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(
|
Container(
|
||||||
mainAxisSize: MainAxisSize.max,
|
width: double.infinity,
|
||||||
children: [
|
height: MediaQuery.sizeOf(context).height * 0.136,
|
||||||
Align(
|
constraints: BoxConstraints(
|
||||||
alignment: AlignmentDirectional(-1, 0),
|
minHeight: 220.rpx,
|
||||||
child: Padding(
|
),
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
decoration: BoxDecoration(),
|
||||||
0, 141.rpx, 0, 0),
|
child: Column(
|
||||||
child: Container(
|
mainAxisSize: MainAxisSize.max,
|
||||||
width: double.infinity,
|
children: [
|
||||||
decoration: BoxDecoration(),
|
Padding(
|
||||||
child: Align(
|
padding:
|
||||||
alignment: AlignmentDirectional(0, 0),
|
EdgeInsetsDirectional.fromSTEB(0, 0, 0, 36.rpx),
|
||||||
child: Text(
|
child: Text(
|
||||||
'登录页.欢迎使用太和e护'.tr,
|
'登录页.其他登录方式'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
fontSize: 48.rpx,
|
fontSize: 26.rpx,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
//todo 颜色
|
color: themeController.currentColor.sc3,
|
||||||
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)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Row(
|
||||||
Container(
|
|
||||||
width: double.infinity,
|
|
||||||
height: MediaQuery.sizeOf(context).height * 0.136,
|
|
||||||
constraints: BoxConstraints(
|
|
||||||
minHeight: 220.rpx,
|
|
||||||
),
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
ClickableContainer(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
backgroundColor: Colors.white, // 背景色
|
||||||
0, 0, 0, 36.rpx),
|
highlightColor: Colors.grey, // 点击水波纹颜色
|
||||||
child: Text(
|
borderRadius: 999.rpx,
|
||||||
'登录页.其他登录方式'.tr,
|
padding: EdgeInsets.zero,
|
||||||
style: TextStyle(
|
// onTap: () {
|
||||||
fontFamily: 'Inter',
|
// TopSlideNotification.show(context,
|
||||||
fontSize: 26.rpx,
|
// text: "待开发功能".tr);
|
||||||
letterSpacing: 0.0,
|
// },
|
||||||
color: themeController.currentColor.sc3,
|
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(
|
ClickableContainer(
|
||||||
mainAxisSize: MainAxisSize.max,
|
backgroundColor: Colors.white,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
highlightColor: Colors.grey,
|
||||||
children: [
|
borderRadius: 999.rpx,
|
||||||
ClickableContainer(
|
padding: EdgeInsets.zero,
|
||||||
backgroundColor: Colors.white, // 背景色
|
onTap: () {
|
||||||
highlightColor: Colors.grey, // 点击水波纹颜色
|
TopSlideNotification.show(context,
|
||||||
borderRadius: 999.rpx,
|
text: "待开发功能".tr);
|
||||||
padding: EdgeInsets.zero,
|
},
|
||||||
// onTap: () {
|
child: Container(
|
||||||
// TopSlideNotification.show(context,
|
width: 91.rpx,
|
||||||
// text: "待开发功能".tr);
|
height: 91.rpx,
|
||||||
// },
|
clipBehavior: Clip.antiAlias,
|
||||||
onTap: () async {
|
decoration: BoxDecoration(
|
||||||
//loginController.model.isIos == true &&
|
shape: BoxShape.circle,
|
||||||
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(
|
child: Image.asset(
|
||||||
backgroundColor: Colors.white,
|
"assets/img/tel.png",
|
||||||
highlightColor: Colors.grey,
|
width: 30.rpx,
|
||||||
borderRadius: 999.rpx,
|
height: 30.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,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
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
@@ -22,7 +22,7 @@ class _EPageState extends State<EPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, boxConstraints) => GestureDetector(
|
builder: (context, boxConstraints) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: themeController.currentColor.sc17,
|
backgroundColor: themeController.currentColor.sc17,
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class _FollowPageState extends State<FollowPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
// decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
// image: DecorationImage(
|
// image: DecorationImage(
|
||||||
@@ -86,7 +86,9 @@ class _FollowPageState extends State<FollowPage> {
|
|||||||
// child: widget.webView,
|
// child: widget.webView,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
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
|
fit: BoxFit.cover, // 填满整个 Container
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class _HelpPageState extends State<HelpPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class _MessagePageState extends State<MessagePage> {
|
|||||||
|
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, boxConstraints) => GestureDetector(
|
builder: (context, boxConstraints) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@@ -253,7 +253,6 @@ class _MessagePageState extends State<MessagePage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
SizedBox(height: 17.rpx),
|
SizedBox(height: 17.rpx),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class _MinePageState extends State<MinePage> {
|
|||||||
int login = userInfoController.model.login!;
|
int login = userInfoController.model.login!;
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -24,205 +24,198 @@ class _BackMovementPageState extends State<BackMovementPage> {
|
|||||||
final double spacing = 34.rpx;
|
final double spacing = 34.rpx;
|
||||||
final double buttonHeight = 101.rpx;
|
final double buttonHeight = 101.rpx;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
iconTheme: IconThemeData(color: themeController.currentColor.sc3),
|
iconTheme: IconThemeData(color: themeController.currentColor.sc3),
|
||||||
backgroundColor: const Color(0xFF011C33), // 统一背景色
|
backgroundColor: const Color(0xFF011C33), // 统一背景色
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
titleSpacing: 0,
|
titleSpacing: 0,
|
||||||
title: SizedBox(
|
title: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 180.rpx,
|
height: 180.rpx,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'背部律动',
|
'背部律动',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
// 左侧图标
|
|
||||||
Positioned(
|
|
||||||
left: 0.rpx,
|
|
||||||
child: returnIconButtomNew,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
// 左侧图标
|
||||||
centerTitle: false,
|
Positioned(
|
||||||
|
left: 0.rpx,
|
||||||
|
child: returnIconButtomNew,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
backgroundColor: const Color(0xFF011C33),
|
),
|
||||||
body: Padding(
|
centerTitle: false,
|
||||||
padding: EdgeInsets.fromLTRB(0.rpx, 0, 0.rpx, 0),
|
),
|
||||||
child: Column(
|
backgroundColor: const Color(0xFF011C33),
|
||||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
body: Padding(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
padding: EdgeInsets.fromLTRB(0.rpx, 0, 0.rpx, 0),
|
||||||
|
child: Column(
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
SingleChildScrollView(
|
SizedBox(height: 30.rpx),
|
||||||
child: Column(
|
Text(
|
||||||
children: [
|
'力度调节',
|
||||||
SizedBox(height: 30.rpx),
|
style: TextStyle(color: Colors.grey, fontSize: 30.rpx),
|
||||||
Text(
|
),
|
||||||
'力度调节',
|
SizedBox(height: 148.rpx),
|
||||||
style: TextStyle(color: Colors.grey, fontSize: 30.rpx),
|
Text(
|
||||||
),
|
intensity.toInt().toString(),
|
||||||
SizedBox(height: 148.rpx),
|
style: TextStyle(color: Colors.white, fontSize: 160.rpx),
|
||||||
Text(
|
),
|
||||||
intensity.toInt().toString(),
|
SizedBox(height: 41.rpx),
|
||||||
style:
|
SizedBox(
|
||||||
TextStyle(color: Colors.white, fontSize: 160.rpx),
|
height: 451.rpx, // 外部容器高度固定
|
||||||
),
|
child: Stack(
|
||||||
SizedBox(height: 41.rpx),
|
children: [
|
||||||
SizedBox(
|
// 左边的 强/弱 文本
|
||||||
height: 451.rpx, // 外部容器高度固定
|
Positioned(
|
||||||
child: Stack(
|
left: 0,
|
||||||
children: [
|
top: 0,
|
||||||
// 左边的 强/弱 文本
|
bottom: 0,
|
||||||
Positioned(
|
child: SizedBox(
|
||||||
left: 0,
|
width: 60.rpx,
|
||||||
top: 0,
|
child: Column(
|
||||||
bottom: 0,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
child: SizedBox(
|
children: [
|
||||||
width: 60.rpx,
|
Text('强',
|
||||||
child: Column(
|
style: TextStyle(
|
||||||
mainAxisAlignment:
|
color: Colors.grey, fontSize: 30.rpx)),
|
||||||
MainAxisAlignment.spaceBetween,
|
Text('弱',
|
||||||
children: [
|
style: TextStyle(
|
||||||
Text('强',
|
color: Colors.grey, fontSize: 30.rpx)),
|
||||||
style: TextStyle(
|
],
|
||||||
color: Colors.grey,
|
|
||||||
fontSize: 30.rpx)),
|
|
||||||
Text('弱',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.grey,
|
|
||||||
fontSize: 30.rpx)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
// 右侧 slider,27.rpx 后居中
|
// 右侧 slider,27.rpx 后居中
|
||||||
Positioned(
|
Positioned(
|
||||||
left: 60.rpx - 27.rpx, // 60 是文字宽度,27 是间隔
|
left: 60.rpx - 27.rpx, // 60 是文字宽度,27 是间隔
|
||||||
right: 0,
|
right: 0,
|
||||||
top: 0,
|
top: 0,
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Transform.rotate(
|
child: Transform.rotate(
|
||||||
angle: -math.pi / 2,
|
angle: -math.pi / 2,
|
||||||
child: ConstrainedBox(
|
child: ConstrainedBox(
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
minHeight: 451.rpx,
|
minHeight: 451.rpx,
|
||||||
maxHeight: 451.rpx,
|
maxHeight: 451.rpx,
|
||||||
),
|
),
|
||||||
child: SliderTheme(
|
child: SliderTheme(
|
||||||
data: SliderTheme.of(context).copyWith(
|
data: SliderTheme.of(context).copyWith(
|
||||||
trackHeight: 60.rpx,
|
trackHeight: 60.rpx,
|
||||||
thumbShape: RoundSliderThumbShape(
|
thumbShape: RoundSliderThumbShape(
|
||||||
enabledThumbRadius: 45.rpx),
|
enabledThumbRadius: 45.rpx),
|
||||||
overlayShape:
|
overlayShape: const RoundSliderOverlayShape(
|
||||||
const RoundSliderOverlayShape(
|
overlayRadius: 20),
|
||||||
overlayRadius: 20),
|
),
|
||||||
),
|
child: Slider(
|
||||||
child: Slider(
|
value: intensity,
|
||||||
value: intensity,
|
min: 1,
|
||||||
min: 1,
|
max: 6,
|
||||||
max: 6,
|
divisions: 7,
|
||||||
divisions: 7,
|
activeColor: Colors.cyanAccent,
|
||||||
activeColor: Colors.cyanAccent,
|
inactiveColor: Colors.blue.shade900,
|
||||||
inactiveColor: Colors.blue.shade900,
|
onChanged: (value) {
|
||||||
onChanged: (value) {
|
setState(() {
|
||||||
setState(() {
|
intensity = value;
|
||||||
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('恢复到默认设置'),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
)));
|
),
|
||||||
|
),
|
||||||
|
)));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||||
|
|
||||||
|
|
||||||
class HomeDeviceType extends StatefulWidget {
|
class HomeDeviceType extends StatefulWidget {
|
||||||
HomeDeviceType({super.key});
|
HomeDeviceType({super.key});
|
||||||
@override
|
@override
|
||||||
@@ -25,85 +24,85 @@ class _HomeDeviceTypeState extends State<HomeDeviceType> {
|
|||||||
// }
|
// }
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, boxConstraints) => GestureDetector(
|
builder: (context, boxConstraints) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||||
fit: BoxFit.fill, // 填满整个 Container
|
fit: BoxFit.fill, // 填满整个 Container
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
iconTheme: const IconThemeData(color: Colors.white),
|
iconTheme: const IconThemeData(color: Colors.white),
|
||||||
titleSpacing: 0,
|
titleSpacing: 0,
|
||||||
// leading: returnIconButtom,
|
// leading: returnIconButtom,
|
||||||
title: SizedBox(
|
title: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 180.rpx,
|
height: 180.rpx,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'添加设备',
|
'添加设备',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 30.rpx,
|
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),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
// 左侧图标
|
||||||
|
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),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)),
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class _MattressControlPageState extends State<MattressControlPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
// onTap: () => FocusScope.of(context).unfocus(),
|
// // onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class ShareDeviceDetailWidget extends GetView {
|
|||||||
type.value = shareInfo['op_type'];
|
type.value = shareInfo['op_type'];
|
||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
key: scaffoldKey,
|
key: scaffoldKey,
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class _MhAboutUsPageState extends State<MhAboutUsPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -24,186 +24,185 @@ class AddressListPage extends GetView<AddressListController> {
|
|||||||
return LayoutBuilder(builder: (context, cc) {
|
return LayoutBuilder(builder: (context, cc) {
|
||||||
bodysize = cc;
|
bodysize = cc;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||||
fit: BoxFit.fill, // 填满整个 Container
|
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(
|
centerTitle: false,
|
||||||
backgroundColor: Colors.transparent,
|
),
|
||||||
appBar: AppBar(
|
body: Container(
|
||||||
backgroundColor: Colors.transparent,
|
margin: EdgeInsets.only(top: 30.rpx),
|
||||||
automaticallyImplyLeading: false,
|
width: bodysize!.maxWidth,
|
||||||
iconTheme: IconThemeData(color: Colors.white),
|
height: bodysize!.maxHeight * 1,
|
||||||
titleSpacing: 0,
|
child: Column(
|
||||||
title: SizedBox(
|
mainAxisSize: MainAxisSize.max,
|
||||||
width: double.infinity,
|
children: [
|
||||||
height: 180.rpx,
|
// Obx(() {
|
||||||
child: Stack(
|
// if (controller.model.addressList!.isEmpty) {
|
||||||
alignment: Alignment.center,
|
// // 如果地址列表为空,显示 EmptyMessageWidget
|
||||||
children: [
|
// return Expanded(child: NullDataWidget());
|
||||||
// 中间居中的标题
|
// } else {
|
||||||
Text(
|
// // 如果地址列表不为空,显示地址列表
|
||||||
'地址管理',
|
// return Expanded(
|
||||||
textAlign: TextAlign.center,
|
// child: Container(
|
||||||
style: TextStyle(
|
// width: bodysize!.maxWidth,
|
||||||
color: Colors.white,
|
// height: bodysize!.maxHeight * 1,
|
||||||
fontSize: 30.rpx,
|
// 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(
|
||||||
Positioned(
|
onPressed: () {
|
||||||
left: 0.rpx,
|
controller.model.address = {'default': 0};
|
||||||
child: returnIconButtomNew,
|
controller.model.type = 1;
|
||||||
),
|
Get.toNamed("/editAddressPage");
|
||||||
],
|
},
|
||||||
),
|
style: TextButton.styleFrom(
|
||||||
),
|
backgroundColor: Colors.transparent,
|
||||||
centerTitle: false,
|
shape: RoundedRectangleBorder(
|
||||||
),
|
borderRadius: BorderRadius.circular(8),
|
||||||
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(
|
padding:
|
||||||
onPressed: () {
|
EdgeInsets.symmetric(horizontal: 24), // 按钮内边距
|
||||||
controller.model.address = {'default': 0};
|
),
|
||||||
controller.model.type = 1;
|
child: Row(
|
||||||
Get.toNamed("/editAddressPage");
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
},
|
children: [
|
||||||
style: TextButton.styleFrom(
|
// Baseline(
|
||||||
backgroundColor: Colors.transparent,
|
// baselineType: TextBaseline.alphabetic,
|
||||||
shape: RoundedRectangleBorder(
|
// baseline: AppFontsize.normal_text_size *
|
||||||
borderRadius: BorderRadius.circular(8),
|
// 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,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
));
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class _ApplyRepairSuccessState extends State<ApplyRepairSuccess> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -67,7 +67,7 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
|||||||
bodysize = cc;
|
bodysize = cc;
|
||||||
final isBind = obsData['bind_type'] == 1;
|
final isBind = obsData['bind_type'] == 1;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class BookInfoPage extends GetView<BookInfoController> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -24,203 +24,202 @@ class BookSuccessPage extends GetView {
|
|||||||
return LayoutBuilder(builder: (context, cc) {
|
return LayoutBuilder(builder: (context, cc) {
|
||||||
bodysize = cc;
|
bodysize = cc;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||||
fit: BoxFit.fill, // 填满整个 Container
|
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,
|
actions: [],
|
||||||
backgroundColor: Colors.transparent,
|
centerTitle: false,
|
||||||
appBar: AppBar(
|
),
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
automaticallyImplyLeading: false,
|
body: Container(
|
||||||
iconTheme: IconThemeData(color: Colors.white),
|
width: bodysize!.maxWidth,
|
||||||
titleSpacing: 0,
|
height: bodysize!.maxHeight * 1,
|
||||||
// leading: returnIconButtomAddCallback(() {
|
child: Column(
|
||||||
// controller.saveDataApi();
|
mainAxisSize: MainAxisSize.max,
|
||||||
// updateParm(isShowToast: false);
|
children: [
|
||||||
// }),
|
Container(
|
||||||
// leading: returnIconButtomNew,
|
width: bodysize!.maxWidth,
|
||||||
title: Container(
|
margin: EdgeInsets.only(top: 90.rpx),
|
||||||
width: double.infinity,
|
child: Column(
|
||||||
height: 180.rpx,
|
mainAxisSize: MainAxisSize.max,
|
||||||
child: Stack(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
Container(
|
||||||
Text(
|
width: 148.rpx,
|
||||||
'我要预约',
|
height: 148.rpx,
|
||||||
textAlign: TextAlign.center,
|
clipBehavior: Clip.antiAlias,
|
||||||
style: TextStyle(
|
decoration: const BoxDecoration(
|
||||||
color: Colors.white,
|
shape: BoxShape.circle,
|
||||||
fontSize: 30.rpx,
|
),
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/images/success.png',
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
color: Color(0xFF84F5FF),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// 左侧图标
|
Align(
|
||||||
Positioned(
|
alignment: const AlignmentDirectional(0, 0),
|
||||||
left: 0.rpx,
|
child: Text(
|
||||||
child: returnIconButtomNew,
|
'预约成功!',
|
||||||
|
style: TextStyle(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
fontSize: 30.rpx,
|
||||||
|
color: Colors.white,
|
||||||
|
letterSpacing: 0,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
].divide(SizedBox(height: 30.rpx)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Container(
|
||||||
actions: [],
|
margin:
|
||||||
centerTitle: false,
|
EdgeInsets.only(left: 30.rpx, right: 30.rpx, top: 55.rpx),
|
||||||
),
|
width: bodysize!.maxWidth,
|
||||||
|
decoration: BoxDecoration(
|
||||||
body: Container(
|
color: Color(0xFF003058),
|
||||||
width: bodysize!.maxWidth,
|
borderRadius: BorderRadius.circular(16.rpx),
|
||||||
height: bodysize!.maxHeight * 1,
|
),
|
||||||
child: Column(
|
child: SingleChildScrollView(
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: bodysize!.maxWidth,
|
|
||||||
margin: EdgeInsets.only(top: 90.rpx),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
SizedBox(height: 20), // 上间距
|
||||||
width: 148.rpx,
|
for (var item in infoList)
|
||||||
height: 148.rpx,
|
Container(
|
||||||
clipBehavior: Clip.antiAlias,
|
height: 60.rpx,
|
||||||
decoration: const BoxDecoration(
|
padding: EdgeInsets.symmetric(horizontal: 35.rpx),
|
||||||
shape: BoxShape.circle,
|
alignment: Alignment.centerLeft,
|
||||||
),
|
|
||||||
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),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
Text(
|
||||||
width: 200.rpx,
|
item['label']!,
|
||||||
height: 60.rpx,
|
style: TextStyle(
|
||||||
child: ElevatedButton(
|
color: Color(0XFF929699),
|
||||||
style: ElevatedButton.styleFrom(
|
fontSize: 26.rpx,
|
||||||
backgroundColor: Color(0xFF84F5FF),
|
),
|
||||||
padding: EdgeInsets.zero, // 去除文字内边距
|
),
|
||||||
tapTargetSize: MaterialTapTargetSize
|
SizedBox(width: 30.rpx),
|
||||||
.shrinkWrap, // 去除额外点击区域
|
Text(
|
||||||
// shape:
|
item['value']!,
|
||||||
// RoundedRectangleBorder(), // 可选:去除默认圆角
|
style: TextStyle(
|
||||||
),
|
color: Colors.white,
|
||||||
onPressed: () {},
|
fontSize: 26.rpx,
|
||||||
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), // 下间距
|
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), // 下间距
|
||||||
|
],
|
||||||
|
)),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
));
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,305 +18,296 @@ class DeletedAccountPage extends GetView {
|
|||||||
bodysize = cc;
|
bodysize = cc;
|
||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||||
fit: BoxFit.fill, // 填满整个 Container
|
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(
|
centerTitle: false,
|
||||||
appBar: AppBar(
|
),
|
||||||
backgroundColor: Colors.transparent,
|
key: scaffoldKey,
|
||||||
automaticallyImplyLeading: false,
|
backgroundColor: Colors.transparent,
|
||||||
iconTheme: const IconThemeData(color: Colors.white),
|
body: Container(
|
||||||
titleSpacing: 0,
|
width: bodysize!.maxWidth,
|
||||||
title: SizedBox(
|
height: bodysize!.maxHeight * 1,
|
||||||
width: double.infinity,
|
decoration: const BoxDecoration(),
|
||||||
height: 180.rpx,
|
child: Column(
|
||||||
child: Stack(
|
mainAxisSize: MainAxisSize.max,
|
||||||
alignment: Alignment.center,
|
children: [
|
||||||
children: [
|
Expanded(
|
||||||
// 中间居中的标题
|
child: Container(
|
||||||
Text(
|
width: MediaQuery.sizeOf(context).width,
|
||||||
'注销账号',
|
height: 100,
|
||||||
textAlign: TextAlign.center,
|
child: SingleChildScrollView(
|
||||||
style: TextStyle(
|
child: Column(
|
||||||
color: Colors.white,
|
mainAxisSize: MainAxisSize.max,
|
||||||
fontSize: 30.rpx,
|
children: [
|
||||||
),
|
Padding(
|
||||||
),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
// 左侧图标
|
15, 33, 15, 0),
|
||||||
Positioned(
|
child: Container(
|
||||||
left: 0.rpx,
|
width: MediaQuery.sizeOf(context).width,
|
||||||
child: returnIconButtomNew,
|
decoration: BoxDecoration(
|
||||||
),
|
borderRadius: BorderRadius.circular(12),
|
||||||
],
|
),
|
||||||
),
|
child: 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(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
15, 33, 15, 0),
|
21, 0, 22, 0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: MediaQuery.sizeOf(context).width,
|
width: MediaQuery.sizeOf(context).width,
|
||||||
decoration: BoxDecoration(
|
child: SingleChildScrollView(
|
||||||
borderRadius: BorderRadius.circular(12),
|
child: Column(
|
||||||
),
|
mainAxisSize: MainAxisSize.max,
|
||||||
child: Padding(
|
mainAxisAlignment:
|
||||||
padding:
|
MainAxisAlignment.spaceBetween,
|
||||||
const EdgeInsetsDirectional.fromSTEB(
|
crossAxisAlignment:
|
||||||
21, 0, 22, 0),
|
CrossAxisAlignment.center,
|
||||||
child: Container(
|
children: [
|
||||||
width: MediaQuery.sizeOf(context).width,
|
Container(
|
||||||
child: SingleChildScrollView(
|
width: 50,
|
||||||
child: Column(
|
height: 50,
|
||||||
mainAxisSize: MainAxisSize.max,
|
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:
|
||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
CrossAxisAlignment.center,
|
CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
RichText(
|
||||||
width: 50,
|
text: TextSpan(
|
||||||
height: 50,
|
text: "账号注销后,你将无法使用以下功能,",
|
||||||
child: Image.asset(
|
style: TextStyle(
|
||||||
'assets/images/delete_account.png',
|
fontSize: AppFontsize
|
||||||
fit: BoxFit.cover,
|
.normal_text_size, // 设置字体大小
|
||||||
color: Color(0XFF84F5FF),
|
color:
|
||||||
),
|
Color(0xFF9AA0B3), // 默认颜色
|
||||||
),
|
),
|
||||||
const Text(
|
children: [
|
||||||
"注销智慧眠花糖账号",
|
TextSpan(
|
||||||
style: TextStyle(
|
text:
|
||||||
fontSize: 20, // 设置字体大小
|
"并且当前有绑定以及被分享的智能床、智能床垫等设备的账号不能注销",
|
||||||
color: Color(0xFFFFFFFF),
|
|
||||||
// decoration: TextDecoration.underline, // 添加下划线
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment
|
|
||||||
.spaceBetween,
|
|
||||||
crossAxisAlignment:
|
|
||||||
CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
RichText(
|
|
||||||
text: TextSpan(
|
|
||||||
text: "账号注销后,你将无法使用以下功能,",
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: AppFontsize
|
fontSize: AppFontsize
|
||||||
.normal_text_size, // 设置字体大小
|
.normal_text_size,
|
||||||
color: Color(
|
color: const Color(
|
||||||
0xFF9AA0B3), // 默认颜色
|
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),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
TextSpan(
|
||||||
const SizedBox(
|
text: ",可先进行解绑后再进行注销操作。",
|
||||||
height: 24,
|
style: TextStyle(
|
||||||
),
|
fontSize: AppFontsize
|
||||||
Text(
|
.normal_text_size,
|
||||||
"无法控制智能床、智能床垫等设备",
|
color: Color(0xFF9AA0B3),
|
||||||
style: TextStyle(
|
),
|
||||||
fontSize: AppFontsize
|
|
||||||
.title_size, // 设置字体大小
|
|
||||||
color:
|
|
||||||
const Color(0xFFFFFFFF),
|
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
const SizedBox(
|
),
|
||||||
height: 6,
|
),
|
||||||
),
|
const SizedBox(
|
||||||
Text(
|
height: 24,
|
||||||
"你将无法控制你的智能床、智能床垫等设备,以及与其相关的各种操作。",
|
),
|
||||||
style: TextStyle(
|
Text(
|
||||||
fontSize: AppFontsize
|
"无法控制智能床、智能床垫等设备",
|
||||||
.normal_text_size, // 设置字体大小
|
style: TextStyle(
|
||||||
color: Color(0xFF9AA0B3),
|
fontSize: AppFontsize
|
||||||
),
|
.title_size, // 设置字体大小
|
||||||
),
|
color: const Color(0xFFFFFFFF),
|
||||||
const SizedBox(
|
),
|
||||||
height: 24,
|
),
|
||||||
),
|
const SizedBox(
|
||||||
Text(
|
height: 6,
|
||||||
"无法查询睡眠报告和体征数据",
|
),
|
||||||
style: TextStyle(
|
Text(
|
||||||
fontSize: AppFontsize
|
"你将无法控制你的智能床、智能床垫等设备,以及与其相关的各种操作。",
|
||||||
.title_size, // 设置字体大小
|
style: TextStyle(
|
||||||
color:
|
fontSize: AppFontsize
|
||||||
const Color(0xFFFFFFFF),
|
.normal_text_size, // 设置字体大小
|
||||||
),
|
color: Color(0xFF9AA0B3),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
),
|
||||||
height: 6,
|
const SizedBox(
|
||||||
),
|
height: 24,
|
||||||
Text(
|
),
|
||||||
"注销账号后你将查询不到你以前的睡眠报告和实时数据。",
|
Text(
|
||||||
style: TextStyle(
|
"无法查询睡眠报告和体征数据",
|
||||||
fontSize: AppFontsize
|
style: TextStyle(
|
||||||
.normal_text_size, // 设置字体大小
|
fontSize: AppFontsize
|
||||||
color: Color(0xFF9AA0B3),
|
.title_size, // 设置字体大小
|
||||||
),
|
color: const Color(0xFFFFFFFF),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
),
|
||||||
height: 24,
|
const SizedBox(
|
||||||
),
|
height: 6,
|
||||||
Text(
|
),
|
||||||
"无法使用的其他功能",
|
Text(
|
||||||
style: TextStyle(
|
"注销账号后你将查询不到你以前的睡眠报告和实时数据。",
|
||||||
fontSize: AppFontsize
|
style: TextStyle(
|
||||||
.title_size, // 设置字体大小
|
fontSize: AppFontsize
|
||||||
color:
|
.normal_text_size, // 设置字体大小
|
||||||
const Color(0xFFFFFFFF),
|
color: Color(0xFF9AA0B3),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 6,
|
height: 24,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"包含设备报修、门店体验预约等。",
|
"无法使用的其他功能",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: AppFontsize
|
fontSize: AppFontsize
|
||||||
.normal_text_size, // 设置字体大小
|
.title_size, // 设置字体大小
|
||||||
color: Color(0xFF9AA0B3),
|
color: const Color(0xFFFFFFFF),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
const SizedBox(
|
||||||
)),
|
height: 6,
|
||||||
]
|
),
|
||||||
.divide(
|
Text(
|
||||||
const SizedBox(height: 24))
|
"包含设备报修、门店体验预约等。",
|
||||||
.addToStart(
|
style: TextStyle(
|
||||||
const SizedBox(height: 14))
|
fontSize: AppFontsize
|
||||||
.addToEnd(
|
.normal_text_size, // 设置字体大小
|
||||||
const SizedBox(height: 17)),
|
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),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
));
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class _MHTBindDeviceTypePageState extends State<MHTBindDeviceTypePage> {
|
|||||||
}
|
}
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
|
|||||||
ef.log("$e");
|
ef.log("$e");
|
||||||
} finally {
|
} finally {
|
||||||
setState(() {
|
setState(() {
|
||||||
isScanning = false;
|
isScanning = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -287,7 +287,7 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, boxConstraints) => GestureDetector(
|
builder: (context, boxConstraints) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class _MHTCalibrationPageCopyState extends State<MHTCalibrationPageCopy> {
|
|||||||
return WillPopScope(
|
return WillPopScope(
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ class _MHTCalibrationPageState extends State<MHTCalibrationPage> {
|
|||||||
return WillPopScope(
|
return WillPopScope(
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -108,7 +108,8 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
|||||||
|
|
||||||
// 导航到下一页
|
// 导航到下一页
|
||||||
if (blueteethBindController.wifiStatus.value != 1) {
|
if (blueteethBindController.wifiStatus.value != 1) {
|
||||||
showConfirmDialog(context, Container(), "未配置网络提示".tr, onConfirm: () async {
|
showConfirmDialog(context, Container(), "未配置网络提示".tr,
|
||||||
|
onConfirm: () async {
|
||||||
_cleanupResources();
|
_cleanupResources();
|
||||||
await _disconnectDevice();
|
await _disconnectDevice();
|
||||||
Get.toNamed("/calibrationPage");
|
Get.toNamed("/calibrationPage");
|
||||||
@@ -124,7 +125,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@@ -1104,7 +1105,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _disconnectDevice() async {
|
Future<void> _disconnectDevice() async {
|
||||||
try {
|
try {
|
||||||
THapp bledevice = THapp(device: widget.deviceInfo.scanResult.device);
|
THapp bledevice = THapp(device: widget.deviceInfo.scanResult.device);
|
||||||
await bledevice.disconnect();
|
await bledevice.disconnect();
|
||||||
|
|||||||
@@ -33,107 +33,107 @@ class _DeviceListPageState extends State<DeviceListPage> {
|
|||||||
return LayoutBuilder(builder: (context, cc) {
|
return LayoutBuilder(builder: (context, cc) {
|
||||||
bodysize = cc;
|
bodysize = cc;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||||
fit: BoxFit.fill, // 填满整个 Container
|
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(
|
backgroundColor: Colors.transparent,
|
||||||
resizeToAvoidBottomInset: false,
|
body: Container(
|
||||||
appBar: AppBar(
|
child: Column(
|
||||||
backgroundColor: Colors.transparent,
|
mainAxisSize: MainAxisSize.max,
|
||||||
automaticallyImplyLeading: false,
|
children: [
|
||||||
iconTheme: IconThemeData(color: Colors.white),
|
Padding(
|
||||||
titleSpacing: 0,
|
padding: EdgeInsetsDirectional.fromSTEB(0, 10, 0, 23),
|
||||||
// leading: returnIconButtomAddCallback(() {
|
child: SearchWidget(
|
||||||
// controller.saveDataApi();
|
keyword: controller.model.keyword,
|
||||||
// updateParm(isShowToast: false);
|
color: controller.model.color,
|
||||||
// }),
|
hint: "检索设备",
|
||||||
// leading: returnIconButtomNew,
|
onChange: (d) {
|
||||||
title: Container(
|
controller.model.keyword = d;
|
||||||
width: double.infinity,
|
},
|
||||||
height: 180.rpx,
|
findCallback: () {
|
||||||
child: Stack(
|
controller.getDeviceList();
|
||||||
alignment: Alignment.center,
|
},
|
||||||
children: [
|
|
||||||
// 中间居中的标题
|
|
||||||
Text(
|
|
||||||
'设备列表',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 30.rpx,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// 左侧图标
|
|
||||||
Positioned(
|
|
||||||
left: 0.rpx,
|
|
||||||
child: returnIconButtomNew,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Obx(() {
|
||||||
|
if (controller.model.deviceList == null ||
|
||||||
|
controller.model.deviceList.isEmpty) {
|
||||||
|
return Expanded(child: NullDataWidget());
|
||||||
|
}
|
||||||
|
|
||||||
actions: [],
|
// 如果 deviceList 不为空,渲染列表
|
||||||
centerTitle: false,
|
return Expanded(
|
||||||
),
|
child: ListView(
|
||||||
backgroundColor: Colors.transparent,
|
shrinkWrap: true,
|
||||||
body: Container(
|
scrollDirection: Axis.vertical,
|
||||||
child: Column(
|
children: controller.model.deviceList
|
||||||
mainAxisSize: MainAxisSize.max,
|
.asMap()
|
||||||
children: [
|
.entries
|
||||||
Padding(
|
.map((e) => DeviceInfoWidget(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(0, 10, 0, 23),
|
index: e.key,
|
||||||
child: SearchWidget(
|
deviceListController: controller,
|
||||||
keyword: controller.model.keyword,
|
))
|
||||||
color: controller.model.color,
|
.toList()
|
||||||
hint: "检索设备",
|
.divide(const SizedBox(height: 10))
|
||||||
onChange: (d) {
|
.addToEnd(const SizedBox(height: 100)),
|
||||||
controller.model.keyword = d;
|
|
||||||
},
|
|
||||||
findCallback: () {
|
|
||||||
controller.getDeviceList();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Obx(() {
|
);
|
||||||
if (controller.model.deviceList == null ||
|
}),
|
||||||
controller.model.deviceList.isEmpty) {
|
],
|
||||||
return Expanded(child: NullDataWidget());
|
),
|
||||||
}
|
)
|
||||||
|
|
||||||
// 如果 deviceList 不为空,渲染列表
|
// Container(
|
||||||
return Expanded(
|
// width: bodysize!.maxWidth,
|
||||||
child: ListView(
|
// height: bodysize!.maxHeight,
|
||||||
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,
|
));
|
||||||
|
|
||||||
// ),
|
|
||||||
),
|
|
||||||
));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,177 +36,176 @@ class DevicePeopleInfo extends GetView<PeopleInfoController> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
controller.getPeoples (data['mac']);
|
controller.getPeoples(data['mac']);
|
||||||
});
|
});
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, boxConstraints) => GestureDetector(
|
builder: (context, boxConstraints) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||||
fit: BoxFit.fill, // 填满整个 Container
|
fit: BoxFit.fill, // 填满整个 Container
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
appBar: AppBar(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
iconTheme: IconThemeData(color: Colors.white),
|
||||||
|
titleSpacing: 0,
|
||||||
|
title: AppBar(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: AppBar(
|
iconTheme: const IconThemeData(color: Colors.white),
|
||||||
backgroundColor: Colors.transparent,
|
automaticallyImplyLeading: false,
|
||||||
automaticallyImplyLeading: false,
|
titleSpacing: 0,
|
||||||
iconTheme: IconThemeData(color: Colors.white),
|
title: SizedBox(
|
||||||
titleSpacing: 0,
|
width: double.infinity,
|
||||||
title: AppBar(
|
height: 180.rpx,
|
||||||
backgroundColor: Colors.transparent,
|
child: Stack(
|
||||||
iconTheme: const IconThemeData(color: Colors.white),
|
alignment: Alignment.center,
|
||||||
automaticallyImplyLeading: false,
|
children: [
|
||||||
titleSpacing: 0,
|
// 中间居中的标题
|
||||||
title: SizedBox(
|
Text(
|
||||||
width: double.infinity,
|
'详情',
|
||||||
height: 180.rpx,
|
textAlign: TextAlign.center,
|
||||||
child: Stack(
|
style: TextStyle(
|
||||||
alignment: Alignment.center,
|
color: Colors.white,
|
||||||
children: [
|
fontSize: 30.rpx,
|
||||||
// 中间居中的标题
|
|
||||||
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,
|
|
||||||
)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
// 左侧图标
|
||||||
|
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
@@ -47,7 +47,7 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
return LayoutBuilder(builder: (context, cc) {
|
return LayoutBuilder(builder: (context, cc) {
|
||||||
bodysize = cc;
|
bodysize = cc;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -62,133 +62,130 @@ class _ExperienceStorePageState extends State<ExperienceStorePage> {
|
|||||||
bodysize = cc;
|
bodysize = cc;
|
||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||||
fit: BoxFit.fill, // 填满整个 Container
|
fit: BoxFit.fill, // 填满整个 Container
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
// key: scaffoldKey,
|
// key: scaffoldKey,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
iconTheme: IconThemeData(color: Colors.white),
|
iconTheme: IconThemeData(color: Colors.white),
|
||||||
titleSpacing: 0,
|
titleSpacing: 0,
|
||||||
title: SizedBox(
|
title: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 180.rpx,
|
height: 180.rpx,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'预约体验',
|
'预约体验',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 30.rpx,
|
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,
|
|
||||||
)))
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
// 左侧图标
|
||||||
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(
|
centerTitle: false,
|
||||||
width: bodysize!.maxWidth,
|
),
|
||||||
height: bodysize!.maxHeight * 1,
|
body: SingleChildScrollView(
|
||||||
child: Column(
|
child: Container(
|
||||||
mainAxisSize: MainAxisSize.max,
|
width: bodysize!.maxWidth,
|
||||||
children: [
|
height: bodysize!.maxHeight * 1,
|
||||||
//todo
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
//todo
|
||||||
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
padding:
|
||||||
0, 40.rpx, 0, 38.rpx),
|
EdgeInsetsDirectional.fromSTEB(0, 40.rpx, 0, 38.rpx),
|
||||||
child: SearchWidget(
|
child: SearchWidget(
|
||||||
keyword: controller.model.keyword,
|
keyword: controller.model.keyword,
|
||||||
color: controller.model.color,
|
color: controller.model.color,
|
||||||
hint: "请输入门店名称",
|
hint: "请输入门店名称",
|
||||||
onChange: (d) {
|
onChange: (d) {
|
||||||
controller.model.keyword = d;
|
controller.model.keyword = d;
|
||||||
},
|
},
|
||||||
findCallback: () {
|
findCallback: () {
|
||||||
// controller.page = 0;
|
// controller.page = 0;
|
||||||
// controller.getData();
|
// 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,
|
|
||||||
))))),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
|
||||||
)),
|
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,
|
||||||
|
))))),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,315 +52,292 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
|
|||||||
});
|
});
|
||||||
int login = userInfoController.model.login!;
|
int login = userInfoController.model.login!;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// // onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||||
fit: BoxFit.fill, // 填满整个 Container
|
fit: BoxFit.fill, // 填满整个 Container
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: MediaQuery.sizeOf(context).width,
|
width: MediaQuery.sizeOf(context).width,
|
||||||
height: MediaQuery.sizeOf(context).height,
|
height: MediaQuery.sizeOf(context).height,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: (userInfoController.model.login! != null &&
|
mainAxisAlignment: (userInfoController.model.login! != null &&
|
||||||
userInfoController.model.login! == 1)
|
userInfoController.model.login! == 1)
|
||||||
? MainAxisAlignment.start
|
? MainAxisAlignment.start
|
||||||
: MainAxisAlignment.center,
|
: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
//未登录
|
//未登录
|
||||||
Obx(() {
|
Obx(() {
|
||||||
if (userInfoController.model.login! == null ||
|
if (userInfoController.model.login! == null ||
|
||||||
userInfoController.model.login! == 0) {
|
userInfoController.model.login! == 0) {
|
||||||
return Center(
|
return Center(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () => Get.toNamed("/loginPage"),
|
onTap: () => Get.toNamed("/loginPage"),
|
||||||
child: RichText(
|
child: RichText(
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
children: [
|
children: [
|
||||||
WidgetSpan(
|
WidgetSpan(
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"登录",
|
"登录",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: stringToColor("#84F5FF"),
|
color: stringToColor("#84F5FF"),
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
bottom: 0, // 控制下划线与文字的间距
|
|
||||||
left: 0,
|
|
||||||
right: 0,
|
|
||||||
child: Container(
|
|
||||||
height: 1, // 下划线粗细
|
|
||||||
color: stringToColor("#84F5FF"),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
Positioned(
|
||||||
TextSpan(
|
bottom: 0, // 控制下划线与文字的间距
|
||||||
text: "查看睡眠报告",
|
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(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
fontFamily: 'Readex Pro',
|
||||||
|
color: themeController.currentColor.sc3,
|
||||||
|
letterSpacing: 0,
|
||||||
fontSize: 30.rpx,
|
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();
|
}
|
||||||
}),
|
if (userInfoController.model.login != null &&
|
||||||
//已登录
|
userInfoController.model.login == 1)
|
||||||
Obx(() {
|
return Expanded(child: NullDataWidget());
|
||||||
if (userInfoController.model.login! != null &&
|
return Container();
|
||||||
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;
|
|
||||||
|
|
||||||
homeController
|
Obx(() {
|
||||||
.selectedDayIndex =
|
if (homeController.selectDevcie.value != null &&
|
||||||
(6).obs;
|
homeController.selectDevcie.value!.isNotEmpty &&
|
||||||
print("$val");
|
deviceController.personnelList.value.isNotEmpty)
|
||||||
if (val == null) {
|
return Expanded(
|
||||||
homeController.sleepDays
|
child: NewSleepReportPage(
|
||||||
.value = [];
|
data: {
|
||||||
} else {
|
"tag": "123",
|
||||||
homeController
|
'date': DateTime.now().millisecondsSinceEpoch,
|
||||||
.selectDevcie
|
'mac': homeController.selectDevcie.value,
|
||||||
.value =
|
'person': homeController.selectPerson.value,
|
||||||
formFieldController
|
'backgroundImg': 'assets/images/new_background.png',
|
||||||
.value!;
|
'arrow': false,
|
||||||
deviceController.getSleeps(
|
'noBackImg': true,
|
||||||
formFieldController
|
'person_show': false,
|
||||||
.value);
|
},
|
||||||
homeController
|
),
|
||||||
.updateAll();
|
);
|
||||||
}
|
// }
|
||||||
},
|
return Container();
|
||||||
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(() {
|
// Expanded(
|
||||||
if (homeController.selectDevcie.value != null &&
|
// child: NewSleepReportPage(
|
||||||
homeController.selectDevcie.value!.isNotEmpty &&
|
// data: {
|
||||||
deviceController.personnelList.value.isNotEmpty)
|
// "tag": "123",
|
||||||
return Expanded(
|
// 'date': DateTime.now().millisecondsSinceEpoch,
|
||||||
child: NewSleepReportPage(
|
// 'mac': homeController.selectDevcie.value,
|
||||||
data: {
|
// 'person': homeController.selectPerson.value,
|
||||||
"tag": "123",
|
// 'backgroundImg': 'assets/images/new_background.png',
|
||||||
'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',
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// }
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
));
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class _MhtSleepReportReturnPageState extends State<MhtSleepReportReturnPage> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -32,171 +32,171 @@ class IssueListPage extends GetView<IssueListController> {
|
|||||||
return LayoutBuilder(builder: (context, cc) {
|
return LayoutBuilder(builder: (context, cc) {
|
||||||
bodysize = cc;
|
bodysize = cc;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||||
fit: BoxFit.fill, // 填满整个 Container
|
fit: BoxFit.fill, // 填满整个 Container
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
iconTheme: IconThemeData(color: Colors.white),
|
iconTheme: IconThemeData(color: Colors.white),
|
||||||
titleSpacing: 0,
|
titleSpacing: 0,
|
||||||
title: SizedBox(
|
title: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 180.rpx,
|
height: 180.rpx,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'问题与帮助',
|
'问题与帮助',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 30.rpx,
|
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),
|
|
||||||
),
|
),
|
||||||
child: Obx(() {
|
),
|
||||||
if (controller.model.isLoading) {
|
// 左侧图标
|
||||||
return Center(child: CircularProgressIndicator()); // ✅ 加载中
|
Positioned(
|
||||||
}
|
left: 0.rpx,
|
||||||
|
child: returnIconButtomNew,
|
||||||
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>))),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// }),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
));
|
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>))),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class _MessageDetailPageState extends State<MessageDetailPage> {
|
|||||||
var messageInfo = widget.data;
|
var messageInfo = widget.data;
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, boxConstraints) => GestureDetector(
|
builder: (context, boxConstraints) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ class _MessagePageState extends State<MessagePage> {
|
|||||||
|
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, boxConstraints) => GestureDetector(
|
builder: (context, boxConstraints) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@@ -261,7 +261,6 @@ class _MessagePageState extends State<MessagePage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Container bottomIcon(BuildContext context) {
|
Container bottomIcon(BuildContext context) {
|
||||||
|
|||||||
@@ -50,103 +50,102 @@ class _MyExperiencePageState extends State<MyExperiencePage> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||||
fit: BoxFit.fill, // 填满整个 Container
|
fit: BoxFit.fill, // 填满整个 Container
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
// key: scaffoldKey,
|
// key: scaffoldKey,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
iconTheme: IconThemeData(color: Colors.white),
|
iconTheme: IconThemeData(color: Colors.white),
|
||||||
titleSpacing: 0,
|
titleSpacing: 0,
|
||||||
// leading: returnIconButtomAddCallback(() {
|
// leading: returnIconButtomAddCallback(() {
|
||||||
// controller.saveDataApi();
|
// controller.saveDataApi();
|
||||||
// updateParm(isShowToast: false);
|
// updateParm(isShowToast: false);
|
||||||
// }),
|
// }),
|
||||||
// leading: returnIconButtomNew,
|
// leading: returnIconButtomNew,
|
||||||
title: Container(
|
title: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 180.rpx,
|
height: 180.rpx,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'我的预约',
|
'我的预约',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
// 左侧图标
|
|
||||||
Positioned(
|
|
||||||
left: 0.rpx,
|
|
||||||
child: returnIconButtomNew,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
// 左侧图标
|
||||||
|
Positioned(
|
||||||
actions: [],
|
left: 0.rpx,
|
||||||
centerTitle: false,
|
child: returnIconButtomNew,
|
||||||
),
|
),
|
||||||
|
],
|
||||||
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,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
))),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
));
|
|
||||||
|
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,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
))),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class _MinePageState extends State<NewMinePage> {
|
|||||||
int login = userInfoController.model.login!;
|
int login = userInfoController.model.login!;
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(builder: (context, bodySize) {
|
return LayoutBuilder(builder: (context, bodySize) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class _PrivacyPolicyPageState extends State<PrivacyPolicyPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@@ -71,6 +71,7 @@ class _PrivacyPolicyPageState extends State<PrivacyPolicyPage> {
|
|||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
/// 左边返回按钮
|
/// 左边返回按钮
|
||||||
Positioned(
|
Positioned(
|
||||||
left: 0,
|
left: 0,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -39,231 +39,221 @@ class DeviceRepairPage extends GetView<RepairListController> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
return LayoutBuilder(builder: (context, cc) {
|
return LayoutBuilder(builder: (context, cc) {
|
||||||
bodysize = cc;
|
bodysize = cc;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||||
fit: BoxFit.fill, // 填满整个 Container
|
fit: BoxFit.fill, // 填满整个 Container
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
// key: scaffoldKey,
|
// key: scaffoldKey,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
iconTheme: const IconThemeData(color: Colors.white),
|
iconTheme: const IconThemeData(color: Colors.white),
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
titleSpacing: 0,
|
titleSpacing: 0,
|
||||||
title: SizedBox(
|
title: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 180.rpx,
|
height: 180.rpx,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'设备报修',
|
'设备报修',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
// 左侧图标
|
|
||||||
Positioned(
|
|
||||||
left: 0.rpx,
|
|
||||||
child: returnIconButtomNew,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
// 左侧图标
|
||||||
centerTitle: false,
|
Positioned(
|
||||||
|
left: 0.rpx,
|
||||||
|
child: returnIconButtomNew,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
),
|
||||||
top: true,
|
centerTitle: false,
|
||||||
child: Padding(
|
),
|
||||||
padding: EdgeInsets.fromLTRB(30.rpx, 6.rpx, 30.rpx, 0),
|
body: SafeArea(
|
||||||
child: Column(
|
top: true,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Padding(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
padding: EdgeInsets.fromLTRB(30.rpx, 6.rpx, 30.rpx, 0),
|
||||||
children: [
|
child: Column(
|
||||||
// 报修须知
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Container(
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
height: 412.rpx,
|
children: [
|
||||||
decoration: BoxDecoration(
|
// 报修须知
|
||||||
border: Border.all(
|
Container(
|
||||||
color: Color(0XFFC8CBD2), width: 0.rpx),
|
height: 412.rpx,
|
||||||
borderRadius: BorderRadius.circular(10),
|
decoration: BoxDecoration(
|
||||||
),
|
border: Border.all(
|
||||||
child: Padding(
|
color: Color(0XFFC8CBD2), width: 0.rpx),
|
||||||
padding: EdgeInsets.fromLTRB(
|
borderRadius: BorderRadius.circular(10),
|
||||||
27.rpx, 49.rpx, 43.rpx, 39.rpx),
|
),
|
||||||
child: Column(
|
child: Padding(
|
||||||
crossAxisAlignment:
|
padding: EdgeInsets.fromLTRB(
|
||||||
CrossAxisAlignment.center,
|
27.rpx, 49.rpx, 43.rpx, 39.rpx),
|
||||||
children: [
|
child: Column(
|
||||||
// 固定的标题部分
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
Text(
|
children: [
|
||||||
"报修须知",
|
// 固定的标题部分
|
||||||
style: TextStyle(
|
Text(
|
||||||
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(
|
|
||||||
"我要报修",
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
color: stringToColor("#011D33"),
|
|
||||||
letterSpacing: 0,
|
|
||||||
fontSize: 30.rpx,
|
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),
|
SizedBox(height: 24.rpx),
|
||||||
// 报修历史标题
|
InkWell(
|
||||||
Container(
|
onTap: () {},
|
||||||
width: double.infinity,
|
child: CustomCard(
|
||||||
child: Text("报修历史",
|
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(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
fontFamily: 'Readex Pro',
|
||||||
fontSize: 30.rpx,
|
color: stringToColor("#011D33"),
|
||||||
height: 1)),
|
letterSpacing: 0,
|
||||||
),
|
fontSize: 30.rpx,
|
||||||
SizedBox(height: 32.rpx),
|
),
|
||||||
// Obx(() {
|
),
|
||||||
// return Visibility(
|
),
|
||||||
// visible: controller.model.repairList != null &&
|
)),
|
||||||
// controller.model.repairList!.isNotEmpty,
|
SizedBox(height: 235.rpx),
|
||||||
// replacement: EmptyMessageWidget(),
|
// 报修历史标题
|
||||||
// child: Expanded(
|
Container(
|
||||||
// child: Obx(() => ListView(
|
width: double.infinity,
|
||||||
// controller:
|
child: Text("报修历史",
|
||||||
// scrollController, // 绑定 ScrollController
|
style: TextStyle(
|
||||||
// shrinkWrap: true,
|
color: Colors.white,
|
||||||
// scrollDirection: Axis.vertical,
|
fontSize: 30.rpx,
|
||||||
// children: (controller.model.repairList
|
height: 1)),
|
||||||
// .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();
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
))),
|
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();
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
))),
|
||||||
|
));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class _RoomPickerPageState extends State<RoomPickerPage> {
|
|||||||
return LayoutBuilder(builder: (context, cc) {
|
return LayoutBuilder(builder: (context, cc) {
|
||||||
bodysize = cc;
|
bodysize = cc;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import 'package:vbvs_app/common/util/FitTool.dart';
|
|||||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||||
import 'package:vbvs_app/controller/mh_controller/score_controller.dart' as mh;
|
import 'package:vbvs_app/controller/mh_controller/score_controller.dart' as mh;
|
||||||
|
|
||||||
class ScorePage extends GetView<mh.ScoreController> {
|
class ScorePage extends GetView<mh.ScoreController> {
|
||||||
BoxConstraints? bodysize;
|
BoxConstraints? bodysize;
|
||||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
@@ -18,432 +19,412 @@ class ScorePage extends GetView<mh.ScoreController> {
|
|||||||
return LayoutBuilder(builder: (context, cc) {
|
return LayoutBuilder(builder: (context, cc) {
|
||||||
bodysize = cc;
|
bodysize = cc;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||||
fit: BoxFit.fill, // 填满整个 Container
|
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(
|
centerTitle: false,
|
||||||
// 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,
|
|
||||||
),
|
|
||||||
|
|
||||||
body: Container(
|
body: Container(
|
||||||
width: bodysize!.maxWidth,
|
width: bodysize!.maxWidth,
|
||||||
height: bodysize!.maxHeight * 1,
|
height: bodysize!.maxHeight * 1,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
// TitleComponentWidget(
|
// TitleComponentWidget(
|
||||||
// titleName: '评价',
|
// titleName: '评价',
|
||||||
// ),
|
// ),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: bodysize!.maxWidth,
|
width: bodysize!.maxWidth,
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
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(
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
30.rpx, 26.rpx, 30.rpx, 0),
|
22, 27, 17, 22),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: bodysize!.maxWidth,
|
width: bodysize!.maxWidth,
|
||||||
constraints: BoxConstraints(
|
|
||||||
minWidth: 346,
|
|
||||||
minHeight: 115,
|
|
||||||
),
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFF003058),
|
color: Color(0xFF003058),
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Column(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
mainAxisSize: MainAxisSize.max,
|
||||||
22, 27, 17, 22),
|
mainAxisAlignment:
|
||||||
child: Container(
|
MainAxisAlignment.spaceBetween,
|
||||||
width: bodysize!.maxWidth,
|
children: [
|
||||||
decoration: BoxDecoration(
|
Align(
|
||||||
color: Color(0xFF003058),
|
alignment: AlignmentDirectional(0, 0),
|
||||||
borderRadius: BorderRadius.circular(16),
|
child: Text(
|
||||||
|
'我要评价'.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
fontSize: 30.rpx,
|
||||||
|
letterSpacing: 0,
|
||||||
|
color: Colors.white),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
child: Column(
|
Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment:
|
mainAxisAlignment:
|
||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
InkWell(
|
||||||
alignment:
|
onTap: () {
|
||||||
AlignmentDirectional(0, 0),
|
controller.model.score = 1;
|
||||||
child: Text(
|
controller.updateAll();
|
||||||
'我要评价'.tr,
|
},
|
||||||
style: TextStyle(
|
child: Obx(() {
|
||||||
fontFamily: 'Readex Pro',
|
return Icon(
|
||||||
fontSize: 30.rpx,
|
Icons.star,
|
||||||
letterSpacing: 0,
|
color: controller
|
||||||
color: Colors.white),
|
.model.score! >=
|
||||||
),
|
1
|
||||||
|
? stringToColor("#F8AE00")
|
||||||
|
: stringToColor("#D0D0D0"),
|
||||||
|
size: 40,
|
||||||
|
);
|
||||||
|
}),
|
||||||
),
|
),
|
||||||
Row(
|
InkWell(
|
||||||
mainAxisSize: MainAxisSize.max,
|
onTap: () {
|
||||||
mainAxisAlignment:
|
controller.model.score = 2;
|
||||||
MainAxisAlignment.center,
|
controller.updateAll();
|
||||||
children: [
|
},
|
||||||
InkWell(
|
child: Obx(() {
|
||||||
onTap: () {
|
return Icon(
|
||||||
controller.model.score = 1;
|
Icons.star,
|
||||||
controller.updateAll();
|
color: controller
|
||||||
},
|
.model.score! >=
|
||||||
child: Obx(() {
|
2
|
||||||
return Icon(
|
? stringToColor("#F8AE00")
|
||||||
Icons.star,
|
: stringToColor("#D0D0D0"),
|
||||||
color: controller
|
size: 40,
|
||||||
.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)),
|
|
||||||
),
|
),
|
||||||
].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(
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
30.rpx, 30.rpx, 30.rpx, 0),
|
14, 14, 14, 21),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: bodysize!.maxWidth,
|
width: bodysize!.maxWidth,
|
||||||
constraints: BoxConstraints(
|
|
||||||
minWidth: 346,
|
|
||||||
minHeight: 152,
|
|
||||||
),
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFF003058),
|
color: Color(0xFF003058),
|
||||||
borderRadius: BorderRadius.circular(16.rpx),
|
borderRadius: BorderRadius.circular(16.rpx),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Column(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
mainAxisSize: MainAxisSize.max,
|
||||||
14, 14, 14, 21),
|
children: [
|
||||||
child: Container(
|
Align(
|
||||||
width: bodysize!.maxWidth,
|
alignment: AlignmentDirectional(0, 0),
|
||||||
decoration: BoxDecoration(
|
child: Obx(() {
|
||||||
color: Color(0xFF003058),
|
String scoreText;
|
||||||
borderRadius:
|
Color scoreColor;
|
||||||
BorderRadius.circular(16.rpx),
|
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(
|
Align(
|
||||||
mainAxisSize: MainAxisSize.max,
|
alignment: AlignmentDirectional(-1, 0),
|
||||||
children: [
|
child: Padding(
|
||||||
Align(
|
padding:
|
||||||
alignment:
|
EdgeInsetsDirectional.fromSTEB(
|
||||||
AlignmentDirectional(0, 0),
|
0, 17, 0, 0),
|
||||||
child: Obx(() {
|
child: Text(
|
||||||
String scoreText;
|
'再多的溢美之词,都比不上您真心的评价。我们愿付出200%的努力,只为您100%的满意~感谢您的支持与厚爱!',
|
||||||
Color scoreColor;
|
style: TextStyle(
|
||||||
if (controller.model.score == 1) {
|
fontFamily: 'Readex Pro',
|
||||||
scoreText = '差';
|
fontSize: 26.rpx,
|
||||||
scoreColor =
|
letterSpacing: 0,
|
||||||
stringToColor("#E55E92");
|
color: Color(0xFF9AA0B3)),
|
||||||
} 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)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
),
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
),
|
||||||
15, 0, 15, AppConstants.page_button_bottom_padding),
|
Padding(
|
||||||
child: Container(
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
width: bodysize!.maxWidth,
|
15, 0, 15, AppConstants.page_button_bottom_padding),
|
||||||
height: bodysize!.maxHeight * 0.056,
|
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(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(16.rpx),
|
borderRadius: BorderRadius.circular(16.rpx),
|
||||||
),
|
),
|
||||||
// child: Container(
|
child: Text(
|
||||||
// width: bodysize!.maxWidth,
|
"提交",
|
||||||
// height: bodysize!.maxHeight * 0.056,
|
style: TextStyle(
|
||||||
// decoration: BoxDecoration(
|
fontFamily: 'Readex Pro',
|
||||||
// color: FlutterFlowTheme.of(context)
|
color: stringToColor("#011D33"),
|
||||||
// .secondaryBackground,
|
letterSpacing: 0,
|
||||||
// borderRadius: BorderRadius.circular(12),
|
fontSize: 30.rpx,
|
||||||
// ),
|
|
||||||
// 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,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)),
|
),
|
||||||
),
|
),
|
||||||
],
|
)),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
));
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class _SleepHabitPageState extends State<SleepHabitPage> {
|
|||||||
return LayoutBuilder(builder: (context, cc) {
|
return LayoutBuilder(builder: (context, cc) {
|
||||||
bodysize = cc;
|
bodysize = cc;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -38,299 +38,294 @@ class Smys extends GetView<SleepingHabitController> {
|
|||||||
|
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, boxConstraints) => GestureDetector(
|
builder: (context, boxConstraints) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||||
fit: BoxFit.fill, // 填满整个 Container
|
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,
|
actions: [],
|
||||||
appBar: AppBar(
|
centerTitle: false,
|
||||||
backgroundColor: Colors.transparent,
|
),
|
||||||
automaticallyImplyLeading: false,
|
body: SafeArea(
|
||||||
iconTheme: IconThemeData(color: Colors.white),
|
top: true,
|
||||||
titleSpacing: 0,
|
child: Obx(
|
||||||
// leading: returnIconButtomAddCallback(() {
|
() => Container(
|
||||||
// controller.saveDataApi();
|
padding: EdgeInsets.only(left: 30.rpx, right: 30.rpx),
|
||||||
// updateParm(isShowToast: false);
|
width: MediaQuery.sizeOf(context).width,
|
||||||
// }),
|
height: MediaQuery.sizeOf(context).height * 1.123,
|
||||||
// leading: returnIconButtomNew,
|
// decoration: BoxDecoration(
|
||||||
title: Container(
|
// color: Colors.transparent,
|
||||||
width: double.infinity,
|
// image: DecorationImage(
|
||||||
height: 180.rpx,
|
// image: AssetImage("assets/images/background.png"),
|
||||||
child: Stack(
|
// fit: BoxFit.cover,
|
||||||
alignment: Alignment.center,
|
// ),
|
||||||
|
// ),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
Container(
|
||||||
Text(
|
width: double.infinity,
|
||||||
'睡眠隐私'.tr,
|
height: MediaQuery.sizeOf(context).height * 0.055,
|
||||||
textAlign: TextAlign.center,
|
decoration: BoxDecoration(
|
||||||
style: TextStyle(
|
border: Border(
|
||||||
color: Colors.white,
|
bottom: BorderSide(
|
||||||
fontSize: 30.rpx,
|
color: const Color(0xFF929699), width: 0.rpx),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// 左侧图标
|
constraints: BoxConstraints(
|
||||||
Positioned(
|
minHeight: 90.rpx, // 设置最小高度
|
||||||
left: 0.rpx,
|
),
|
||||||
child: returnIconButtomNew,
|
child: Padding(
|
||||||
),
|
padding: EdgeInsets.fromLTRB(
|
||||||
],
|
39.rpx, 0.rpx, 15.rpx, 0.rpx),
|
||||||
),
|
child: Row(
|
||||||
),
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
actions: [],
|
children: [
|
||||||
centerTitle: false,
|
Text(
|
||||||
),
|
'睡眠隐私功能'.tr,
|
||||||
body: SafeArea(
|
style: TextStyle(
|
||||||
top: true,
|
fontFamily: 'Readex Pro',
|
||||||
child: Obx(
|
color: Color(0xFF9EA4B7),
|
||||||
() => Container(
|
fontSize: 26.rpx,
|
||||||
padding: EdgeInsets.only(left: 30.rpx, right: 30.rpx),
|
letterSpacing: 0,
|
||||||
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),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
constraints: BoxConstraints(
|
Container(
|
||||||
minHeight: 90.rpx, // 设置最小高度
|
|
||||||
),
|
// height:
|
||||||
child: Padding(
|
// MediaQuery.sizeOf(context).height *
|
||||||
padding: EdgeInsets.fromLTRB(
|
// 0.04,
|
||||||
39.rpx, 0.rpx, 30.rpx, 0.rpx),
|
child: FlutterSwitch(
|
||||||
child: Row(
|
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,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'开始时间'.tr,
|
"${controller.model.smysStartTimeToString}",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF9EA4B7),
|
color: Colors.white,
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Row(
|
SizedBox(
|
||||||
mainAxisSize: MainAxisSize.max,
|
width: 16.rpx,
|
||||||
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,
|
|
||||||
))
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
|
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(),
|
constraints: BoxConstraints(
|
||||||
InkWell(
|
minHeight: 90.rpx, // 设置最小高度
|
||||||
onTap: () async {
|
),
|
||||||
showDayTimeSelectionDialog(context,
|
child: Padding(
|
||||||
dayTimeArr: controller.model.smysEndTime,
|
padding: EdgeInsets.fromLTRB(
|
||||||
title: "结束时间".tr, checkChange: (d) {
|
39.rpx, 0.rpx, 30.rpx, 0.rpx),
|
||||||
controller.attr.update((getmodel) {
|
child: Row(
|
||||||
getmodel.model.smysEndTime = [
|
mainAxisSize: MainAxisSize.max,
|
||||||
int.parse("${d[0]}"),
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
int.parse("${d[1]}")
|
children: [
|
||||||
];
|
Text(
|
||||||
});
|
'结束时间'.tr,
|
||||||
// updateParm();
|
style: TextStyle(
|
||||||
});
|
fontFamily: 'Readex Pro',
|
||||||
},
|
color: Color(0xFF9EA4B7),
|
||||||
child: Container(
|
fontSize: 26.rpx,
|
||||||
width: double.infinity,
|
letterSpacing: 0,
|
||||||
height: MediaQuery.sizeOf(context).height * 0.055,
|
),
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border(
|
|
||||||
bottom: BorderSide(
|
|
||||||
color: const Color(0xFF929699),
|
|
||||||
width: 0.rpx),
|
|
||||||
),
|
),
|
||||||
),
|
Row(
|
||||||
constraints: BoxConstraints(
|
|
||||||
minHeight: 90.rpx, // 设置最小高度
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.fromLTRB(
|
|
||||||
39.rpx, 0.rpx, 30.rpx, 0.rpx),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'结束时间'.tr,
|
"${controller.model.smysEndTimeToString}",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF9EA4B7),
|
color: Colors.white,
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Row(
|
SizedBox(
|
||||||
mainAxisSize: MainAxisSize.max,
|
width: 16.rpx,
|
||||||
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,
|
|
||||||
))
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
|
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),
|
), // getLine(),
|
||||||
child: Container(
|
SizedBox(
|
||||||
width: double.infinity,
|
height: 30.rpx,
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Text(
|
|
||||||
'*注:开启睡眠隐私功能后,在设置的时间段内,将不会采集您的睡眠数据。'.tr,
|
|
||||||
style: TextStyle(
|
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
color: Color(0xFF9EA4B7),
|
|
||||||
fontSize: 20.rpx,
|
|
||||||
letterSpacing: 0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)),
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class _UpdateUserPageState extends State<EditUserPage> {
|
|||||||
int login = userInfoController.model.login!;
|
int login = userInfoController.model.login!;
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -134,7 +134,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
|||||||
return LayoutBuilder(builder: (context, cc) {
|
return LayoutBuilder(builder: (context, cc) {
|
||||||
bodysize = cc;
|
bodysize = cc;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@@ -1458,7 +1458,8 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
|||||||
color:
|
color:
|
||||||
stringToColor(
|
stringToColor(
|
||||||
"FF9F66"),
|
"FF9F66"),
|
||||||
fontSize: 23.rpx,
|
fontSize:
|
||||||
|
23.rpx,
|
||||||
letterSpacing:
|
letterSpacing:
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
@@ -1504,7 +1505,8 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
|||||||
color:
|
color:
|
||||||
stringToColor(
|
stringToColor(
|
||||||
"FF9F66"),
|
"FF9F66"),
|
||||||
fontSize: 23.rpx,
|
fontSize:
|
||||||
|
23.rpx,
|
||||||
letterSpacing:
|
letterSpacing:
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -181,59 +181,200 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, boxConstraints) => GestureDetector(
|
builder: (context, boxConstraints) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||||
fit: BoxFit.fill, // 填满整个 Container
|
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(
|
actions: [],
|
||||||
backgroundColor: Colors.transparent,
|
centerTitle: false,
|
||||||
appBar: AppBar(
|
),
|
||||||
backgroundColor: Colors.transparent,
|
body: SafeArea(
|
||||||
automaticallyImplyLeading: false,
|
top: true,
|
||||||
iconTheme: const IconThemeData(color: Colors.white),
|
child: Obx(
|
||||||
titleSpacing: 0,
|
() => Container(
|
||||||
title: Container(
|
padding: EdgeInsets.only(left: 30.rpx, right: 30.rpx),
|
||||||
width: double.infinity,
|
width: MediaQuery.sizeOf(context).width,
|
||||||
height: 180.rpx,
|
height: MediaQuery.sizeOf(context).height * 1.123,
|
||||||
child: Stack(
|
child: Column(
|
||||||
alignment: Alignment.center,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
Container(
|
||||||
Text(
|
margin: EdgeInsets.only(left: 40.rpx, right: 16.rpx),
|
||||||
'柔性唤醒',
|
width: double.infinity,
|
||||||
textAlign: TextAlign.center,
|
height: 90.rpx,
|
||||||
style: TextStyle(
|
decoration: const BoxDecoration(),
|
||||||
color: Colors.white,
|
child: Row(
|
||||||
fontSize: 30.rpx,
|
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(
|
getLine(),
|
||||||
left: 0.rpx,
|
InkWell(
|
||||||
child: returnIconButtomNew,
|
onTap: () {
|
||||||
),
|
showOneSelectionDialog(
|
||||||
],
|
context,
|
||||||
),
|
arr: ['开', "关"],
|
||||||
),
|
checkIndex: controller.model.rxhxIsAnMo ? 0 : 1,
|
||||||
actions: [],
|
title: "按摩",
|
||||||
centerTitle: false,
|
checkChange: (index) {
|
||||||
),
|
controller.attr.update((getmodel) {
|
||||||
body: SafeArea(
|
getmodel.model.rxhxIsAnMo =
|
||||||
top: true,
|
index == 0 ? true : false;
|
||||||
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: Container(
|
||||||
child: Column(
|
margin: EdgeInsets.only(left: 40.rpx, right: 30.rpx),
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(left: 40.rpx, right: 16.rpx),
|
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 90.rpx,
|
height: 90.rpx,
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
@@ -242,7 +383,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'柔性唤醒功能',
|
'按摩',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -250,255 +391,59 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
// height:
|
children: [
|
||||||
// MediaQuery.sizeOf(context).height *
|
Text(
|
||||||
// 0.04,
|
controller.model.rxhxIsAnMo ? '开' : '关',
|
||||||
child: FlutterSwitch(
|
style: TextStyle(
|
||||||
width: 70.rpx,
|
fontFamily: 'Readex Pro',
|
||||||
height: 36.rpx,
|
color: Colors.white,
|
||||||
toggleSize: 30.rpx,
|
fontSize: 26.rpx,
|
||||||
activeColor: Color(0XFF6BFDAC),
|
letterSpacing: 0,
|
||||||
inactiveColor: Color(0XFF003058),
|
),
|
||||||
toggleColor: Color(0xFF011D33),
|
),
|
||||||
value: controller.model.smysIsStart,
|
SizedBox(
|
||||||
onToggle: (val) {
|
width: 16.rpx,
|
||||||
controller.attr.update((getmodel) {
|
),
|
||||||
getmodel.model.smysIsStart = val;
|
Container(
|
||||||
});
|
height: 30.rpx,
|
||||||
},
|
width: 30.rpx,
|
||||||
)),
|
child: SvgPicture.asset(
|
||||||
// Container(
|
'assets/img/icon/expand_more.svg',
|
||||||
// height:
|
color: Colors.white,
|
||||||
// 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(),
|
getLine(),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () async {
|
onTap: () {
|
||||||
showDayTimeSelectionDialog(context,
|
showOneSelectionDialog(
|
||||||
dayTimeArr: controller.model.rxhxWakeTime,
|
context,
|
||||||
title: "唤醒时间", checkChange: (d) {
|
arr: location,
|
||||||
controller.attr.update((getmodel) {
|
checkIndex: controller.model.rxhxLocation,
|
||||||
getmodel.model.rxhxWakeTime = [
|
title: "唤醒部位",
|
||||||
int.parse("${d[0]}"),
|
checkChange: (index) {
|
||||||
int.parse("${d[1]}")
|
controller.attr.update((getmodel) {
|
||||||
];
|
getmodel.model.rxhxLocation = index;
|
||||||
});
|
|
||||||
print("$d");
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
);
|
||||||
margin:
|
},
|
||||||
EdgeInsets.only(left: 40.rpx, right: 30.rpx),
|
child: Container(
|
||||||
width: double.infinity,
|
margin: EdgeInsets.only(left: 40.rpx, right: 30.rpx),
|
||||||
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),
|
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
|
height: 90.rpx,
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: Column(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'自定义',
|
'唤醒部位',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -506,175 +451,220 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// Padding(
|
Row(
|
||||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
mainAxisSize: MainAxisSize.max,
|
||||||
// 0, 20.rpx, 0, 0),
|
children: [
|
||||||
// child: Container(
|
Text(
|
||||||
// width: double.infinity,
|
location[controller.model.rxhxLocation],
|
||||||
// height:
|
style: TextStyle(
|
||||||
// MediaQuery.sizeOf(context).height * 0.046,
|
fontFamily: 'Readex Pro',
|
||||||
// decoration: const BoxDecoration(),
|
color: Colors.white,
|
||||||
// child: Row(
|
fontSize: 26.rpx,
|
||||||
// mainAxisSize: MainAxisSize.max,
|
letterSpacing: 0,
|
||||||
// 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,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
),
|
||||||
),
|
SizedBox(
|
||||||
)
|
width: 16.rpx,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 30.rpx,
|
||||||
|
width: 30.rpx,
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
'assets/img/icon/expand_more.svg',
|
||||||
|
color: Colors.white,
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
)),
|
||||||
),
|
),
|
||||||
getLine(),
|
getLine(),
|
||||||
SizedBox(
|
Container(
|
||||||
height: 30.rpx,
|
margin: EdgeInsets.only(
|
||||||
),
|
top: 30.rpx,
|
||||||
Container(
|
bottom: 30.rpx,
|
||||||
margin: EdgeInsets.only(left: 26.rpx, right: 26.rpx),
|
left: 40.rpx,
|
||||||
width: double.infinity,
|
right: 30.rpx),
|
||||||
decoration: const BoxDecoration(),
|
width: double.infinity,
|
||||||
child: Text(
|
decoration: const BoxDecoration(),
|
||||||
'*注:开启该功能后,在设置的时间点,设备将启动一段固定时长的柔性唤醒功能。',
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'自定义',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF929699),
|
color: Colors.white,
|
||||||
fontSize: 20.rpx,
|
fontSize: 26.rpx,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
// Padding(
|
||||||
Spacer(),
|
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
Padding(
|
// 0, 20.rpx, 0, 0),
|
||||||
padding: EdgeInsets.only(bottom: 85.rpx),
|
// child: Container(
|
||||||
child: CustomCard(
|
// width: double.infinity,
|
||||||
borderRadius: 16.rpx,
|
// height:
|
||||||
gradientDirection: GradientDirection.vertical,
|
// MediaQuery.sizeOf(context).height * 0.046,
|
||||||
onTap: () {},
|
// decoration: const BoxDecoration(),
|
||||||
colors: const [
|
// child: Row(
|
||||||
Color(0xFFFCFCFC),
|
// mainAxisSize: MainAxisSize.max,
|
||||||
Color(0xFFF8FAF9),
|
// mainAxisAlignment:
|
||||||
Color(0XFFECF6F3),
|
// MainAxisAlignment.spaceBetween,
|
||||||
Color(0XFFD9F0E9),
|
// children: [
|
||||||
Color(0xFFCEECE3)
|
// ...List.generate(7, (index) {
|
||||||
],
|
// return InkWell(
|
||||||
child: Container(
|
// onTap: () {
|
||||||
width: double.infinity,
|
// controller.attr.update((getmodel) {
|
||||||
height: 90.rpx,
|
// getmodel.model
|
||||||
alignment: Alignment.center,
|
// .rxhxWeeks[index] = getmodel
|
||||||
decoration: BoxDecoration(
|
// .model
|
||||||
borderRadius: BorderRadius.circular(6),
|
// .rxhxWeeks[index] ==
|
||||||
),
|
// 0
|
||||||
child: Text("完成",
|
// ? 1
|
||||||
style: TextStyle(
|
// : 0;
|
||||||
color: const Color(0xFF003058),
|
// });
|
||||||
fontSize: 26.rpx)),
|
// },
|
||||||
|
// 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)),
|
||||||
|
),
|
||||||
|
))
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)),
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
|||||||
return LayoutBuilder(builder: (context, cc) {
|
return LayoutBuilder(builder: (context, cc) {
|
||||||
bodysize = cc;
|
bodysize = cc;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@@ -42,7 +42,7 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
// key: scaffoldKey,
|
// key: scaffoldKey,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
// backgroundColor: Colors.transparent,
|
// backgroundColor: Colors.transparent,
|
||||||
@@ -601,7 +601,7 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
|||||||
UnderlineInputBorder(
|
UnderlineInputBorder(
|
||||||
borderSide:
|
borderSide:
|
||||||
BorderSide(
|
BorderSide(
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
width: 2,
|
width: 2,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius:
|
||||||
@@ -753,7 +753,7 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
|||||||
UnderlineInputBorder(
|
UnderlineInputBorder(
|
||||||
borderSide:
|
borderSide:
|
||||||
BorderSide(
|
BorderSide(
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
width: 2,
|
width: 2,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius:
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class _UserAgreementPageState extends State<UserAgreementPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class _EPageState extends State<PersonPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class _UpdatePageState extends State<UpdatePersonPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class _ApplyRepairPageState extends State<ApplyRepairPage> {
|
|||||||
}
|
}
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodysize) => GestureDetector(
|
builder: (context, bodysize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class _ApplyRepairSuccessState extends State<ApplyRepairSuccess> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class _RepairDetailPageState extends State<RepairDetailPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodysize) => GestureDetector(
|
builder: (context, bodysize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class _RepairListPageState extends State<RepairListPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodysize) => GestureDetector(
|
builder: (context, bodysize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ class _CommonMessageSettingPageState extends State<CommonMessageSettingPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodysize) => GestureDetector(
|
builder: (context, bodysize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class _LanguageSettingState extends State<LanguageSetting> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ class BarChartPainter extends CustomPainter {
|
|||||||
// 缓存 tip 信息
|
// 缓存 tip 信息
|
||||||
if (selectedBar == d) {
|
if (selectedBar == d) {
|
||||||
tipText =
|
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(
|
final tp = TextPainter(
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
|
|||||||
@@ -84,9 +84,28 @@ class TimeSeriesChart extends StatelessWidget {
|
|||||||
final xLabels = _generateXLabels();
|
final xLabels = _generateXLabels();
|
||||||
final midY = (yMin + yMax) / 2;
|
final midY = (yMin + yMax) / 2;
|
||||||
|
|
||||||
List<FlSpot> spots = dataPoints.map((p) {
|
// 将数据点分割成多个连续段,遇到value=-1时断开
|
||||||
return FlSpot(_timeToX(p.timestamp.toDouble(), xLabels), p.value);
|
List<List<FlSpot>> lineSegments = [];
|
||||||
}).toList();
|
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(
|
return AspectRatio(
|
||||||
aspectRatio: 2,
|
aspectRatio: 2,
|
||||||
@@ -204,15 +223,16 @@ class TimeSeriesChart extends StatelessWidget {
|
|||||||
top: BorderSide.none,
|
top: BorderSide.none,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
lineBarsData: [
|
lineBarsData: lineSegments.map((segment) {
|
||||||
LineChartBarData(
|
return LineChartBarData(
|
||||||
spots: spots,
|
spots: segment,
|
||||||
isCurved: false,
|
isCurved: false,
|
||||||
color: themeController.currentColor.sc2,
|
color: themeController.currentColor.sc2,
|
||||||
barWidth: 2,
|
barWidth: 2,
|
||||||
dotData: FlDotData(show: false),
|
dotData: FlDotData(show: false),
|
||||||
)
|
preventCurveOverShooting: true,
|
||||||
],
|
);
|
||||||
|
}).toList(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -47,11 +47,21 @@ class _BreatheStandardWidgetState extends State<BreatheStandardWidget> {
|
|||||||
final endTime = widget.sleepReport['endTime'];
|
final endTime = widget.sleepReport['endTime'];
|
||||||
List<Map<String, dynamic>> data =
|
List<Map<String, dynamic>> data =
|
||||||
(widget.sleepReport['brbc'] as List).cast<Map<String, dynamic>>();
|
(widget.sleepReport['brbc'] as List).cast<Map<String, dynamic>>();
|
||||||
final dataPoints = data.map((item) {
|
List<TimeSeriesPoint> dataPoints = [];
|
||||||
final x = item['st'] as int;
|
|
||||||
final y = (item['value'] as num).toDouble(); // 安全地转换为 double
|
if (data != null && data.isNotEmpty) {
|
||||||
return TimeSeriesPoint(x, y);
|
data.forEach((item) {
|
||||||
}).toList();
|
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 =
|
List<Map<String, dynamic>> brs =
|
||||||
(widget.sleepReport['brs'] as List).cast<Map<String, dynamic>>();
|
(widget.sleepReport['brs'] as List).cast<Map<String, dynamic>>();
|
||||||
@@ -130,7 +140,8 @@ class _BreatheStandardWidgetState extends State<BreatheStandardWidget> {
|
|||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
// "呼吸数据介绍".tr,
|
// "呼吸数据介绍".tr,
|
||||||
"呼吸数据是指用户在睡眠过程中呼吸的基本数据,是评估睡眠呼吸质量、筛查睡眠呼吸障碍的核心指标。".tr,
|
"呼吸数据是指用户在睡眠过程中呼吸的基本数据,是评估睡眠呼吸质量、筛查睡眠呼吸障碍的核心指标。"
|
||||||
|
.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
|
|||||||
@@ -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:vbvs_app/pages/sleep_report/chart/TimeSeriesChart.dart';
|
||||||
import 'package:EasyDartModule/EasyDartModule.dart' as es;
|
import 'package:EasyDartModule/EasyDartModule.dart' as es;
|
||||||
|
|
||||||
|
//心率基准
|
||||||
class HeartRateStandardWidget extends StatefulWidget {
|
class HeartRateStandardWidget extends StatefulWidget {
|
||||||
var sleepReport;
|
var sleepReport;
|
||||||
HeartRateStandardWidget({super.key, required this.sleepReport});
|
HeartRateStandardWidget({super.key, required this.sleepReport});
|
||||||
@@ -48,11 +49,21 @@ class _HeartRateStandardWidgetState extends State<HeartRateStandardWidget> {
|
|||||||
final endTime = widget.sleepReport['endTime'];
|
final endTime = widget.sleepReport['endTime'];
|
||||||
List<Map<String, dynamic>> data =
|
List<Map<String, dynamic>> data =
|
||||||
(widget.sleepReport['hrbc'] as List).cast<Map<String, dynamic>>();
|
(widget.sleepReport['hrbc'] as List).cast<Map<String, dynamic>>();
|
||||||
final dataPoints = data.map((item) {
|
List<TimeSeriesPoint> dataPoints = [];
|
||||||
final x = item['st'] as int;
|
|
||||||
final y = (item['value'] as num).toDouble(); // 安全地转换为 double
|
if (data != null && data.isNotEmpty) {
|
||||||
return TimeSeriesPoint(x, y);
|
data.forEach((item) {
|
||||||
}).toList();
|
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 =
|
List<Map<String, dynamic>> hrs =
|
||||||
(widget.sleepReport['hrs'] as List).cast<Map<String, dynamic>>();
|
(widget.sleepReport['hrs'] as List).cast<Map<String, dynamic>>();
|
||||||
@@ -129,7 +140,8 @@ class _HeartRateStandardWidgetState extends State<HeartRateStandardWidget> {
|
|||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
// "心率数据介绍".tr,
|
// "心率数据介绍".tr,
|
||||||
"心率数据是指用户在睡眠过程中基本心率数据,可初步判断睡眠中的心血管负荷及自主神经功能状态,为睡眠健康评估提供重要依据。".tr,
|
"心率数据是指用户在睡眠过程中基本心率数据,可初步判断睡眠中的心血管负荷及自主神经功能状态,为睡眠健康评估提供重要依据。"
|
||||||
|
.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
@@ -376,7 +388,7 @@ class _HeartRateStandardWidgetState extends State<HeartRateStandardWidget> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
es.EasyDartModule.logger.error("打鼾监测绘制异常${e}");
|
es.EasyDartModule.logger.error("心率基准绘制异常${e}");
|
||||||
return Container();
|
return Container();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ class _MHTNewSleepReportPageState extends State<MHTNewSleepReportPage> {
|
|||||||
double lineWidth = 115.rpx;
|
double lineWidth = 115.rpx;
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
|||||||
double lineWidth = 115.rpx;
|
double lineWidth = 115.rpx;
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
|||||||
double lineWidth = 115.rpx;
|
double lineWidth = 115.rpx;
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: (widget.data['noBackImg'] != null &&
|
image: (widget.data['noBackImg'] != null &&
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class _SleepReportPageState extends State<SleepReportPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@@ -67,11 +67,11 @@ class _SleepReportPageState extends State<SleepReportPage> {
|
|||||||
Text(
|
Text(
|
||||||
'健康报告'.tr,
|
'健康报告'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
/// 左边返回按钮
|
/// 左边返回按钮
|
||||||
@@ -117,6 +117,4 @@ class _SleepReportPageState extends State<SleepReportPage> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,8 +20,7 @@ class _AboutUsPageState extends State<AboutUsPage> {
|
|||||||
// pdfController.loadPdf();
|
// pdfController.loadPdf();
|
||||||
|
|
||||||
widget.webView = MyWebView(
|
widget.webView = MyWebView(
|
||||||
url:
|
url: AppConstants().ent_type == 1
|
||||||
AppConstants().ent_type == 1
|
|
||||||
? "https://mp.weixin.qq.com/s/IAr4RNBy0hGJXGKyMxe7eQ"
|
? "https://mp.weixin.qq.com/s/IAr4RNBy0hGJXGKyMxe7eQ"
|
||||||
: "https://mp.weixin.qq.com/s/7BvvprVDqX1eOzM3Lms8dg",
|
: "https://mp.weixin.qq.com/s/7BvvprVDqX1eOzM3Lms8dg",
|
||||||
onLoad: () {
|
onLoad: () {
|
||||||
@@ -34,7 +33,7 @@ class _AboutUsPageState extends State<AboutUsPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class _PrivacySchemePageState extends State<PrivacySchemePage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@@ -577,8 +577,10 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
AppConstants().ent_type == 1? 'Copyright © 202-2025 嘉兴太和信息技术有限责任公司 版权所有'
|
AppConstants().ent_type == 1
|
||||||
.tr:"Copyright © 202-2025 杭州欢睡科技有限公司 版权所有",
|
? 'Copyright © 202-2025 嘉兴太和信息技术有限责任公司 版权所有'
|
||||||
|
.tr
|
||||||
|
: "Copyright © 202-2025 杭州欢睡科技有限公司 版权所有",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc4,
|
color: themeController.currentColor.sc4,
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class _UpdateUserPageState extends State<UpdateUserPage> {
|
|||||||
int login = userInfoController.model.login!;
|
int login = userInfoController.model.login!;
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@@ -290,12 +290,12 @@ class _UpdateUserPageState extends State<UpdateUserPage> {
|
|||||||
filled: false,
|
filled: false,
|
||||||
),
|
),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
color: themeController
|
color: themeController
|
||||||
.currentColor.sc3,
|
.currentColor.sc3,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
cursorColor: themeController
|
cursorColor: themeController
|
||||||
.currentColor.sc3,
|
.currentColor.sc3,
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class _UserSchemePageState extends State<UserSchemePage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class _XiaoEPageState extends State<XiaoEPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, bodySize) => GestureDetector(
|
builder: (context, bodySize) => GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
Reference in New Issue
Block a user