更新睡眠的心率基准图不显示
This commit is contained in:
@@ -24,205 +24,198 @@ class _BackMovementPageState extends State<BackMovementPage> {
|
||||
final double spacing = 34.rpx;
|
||||
final double buttonHeight = 101.rpx;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
iconTheme: IconThemeData(color: themeController.currentColor.sc3),
|
||||
backgroundColor: const Color(0xFF011C33), // 统一背景色
|
||||
automaticallyImplyLeading: false,
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'背部律动',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
appBar: AppBar(
|
||||
iconTheme: IconThemeData(color: themeController.currentColor.sc3),
|
||||
backgroundColor: const Color(0xFF011C33), // 统一背景色
|
||||
automaticallyImplyLeading: false,
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'背部律动',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
centerTitle: false,
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
backgroundColor: const Color(0xFF011C33),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.fromLTRB(0.rpx, 0, 0.rpx, 0),
|
||||
child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
backgroundColor: const Color(0xFF011C33),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.fromLTRB(0.rpx, 0, 0.rpx, 0),
|
||||
child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 30.rpx),
|
||||
Text(
|
||||
'力度调节',
|
||||
style: TextStyle(color: Colors.grey, fontSize: 30.rpx),
|
||||
),
|
||||
SizedBox(height: 148.rpx),
|
||||
Text(
|
||||
intensity.toInt().toString(),
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 160.rpx),
|
||||
),
|
||||
SizedBox(height: 41.rpx),
|
||||
SizedBox(
|
||||
height: 451.rpx, // 外部容器高度固定
|
||||
child: Stack(
|
||||
children: [
|
||||
// 左边的 强/弱 文本
|
||||
Positioned(
|
||||
left: 0,
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
child: SizedBox(
|
||||
width: 60.rpx,
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('强',
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 30.rpx)),
|
||||
Text('弱',
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 30.rpx)),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30.rpx),
|
||||
Text(
|
||||
'力度调节',
|
||||
style: TextStyle(color: Colors.grey, fontSize: 30.rpx),
|
||||
),
|
||||
SizedBox(height: 148.rpx),
|
||||
Text(
|
||||
intensity.toInt().toString(),
|
||||
style: TextStyle(color: Colors.white, fontSize: 160.rpx),
|
||||
),
|
||||
SizedBox(height: 41.rpx),
|
||||
SizedBox(
|
||||
height: 451.rpx, // 外部容器高度固定
|
||||
child: Stack(
|
||||
children: [
|
||||
// 左边的 强/弱 文本
|
||||
Positioned(
|
||||
left: 0,
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
child: SizedBox(
|
||||
width: 60.rpx,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('强',
|
||||
style: TextStyle(
|
||||
color: Colors.grey, fontSize: 30.rpx)),
|
||||
Text('弱',
|
||||
style: TextStyle(
|
||||
color: Colors.grey, fontSize: 30.rpx)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// 右侧 slider,27.rpx 后居中
|
||||
Positioned(
|
||||
left: 60.rpx - 27.rpx, // 60 是文字宽度,27 是间隔
|
||||
right: 0,
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
child: Center(
|
||||
child: Transform.rotate(
|
||||
angle: -math.pi / 2,
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 451.rpx,
|
||||
maxHeight: 451.rpx,
|
||||
),
|
||||
child: SliderTheme(
|
||||
data: SliderTheme.of(context).copyWith(
|
||||
trackHeight: 60.rpx,
|
||||
thumbShape: RoundSliderThumbShape(
|
||||
enabledThumbRadius: 45.rpx),
|
||||
overlayShape:
|
||||
const RoundSliderOverlayShape(
|
||||
overlayRadius: 20),
|
||||
),
|
||||
child: Slider(
|
||||
value: intensity,
|
||||
min: 1,
|
||||
max: 6,
|
||||
divisions: 7,
|
||||
activeColor: Colors.cyanAccent,
|
||||
inactiveColor: Colors.blue.shade900,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
intensity = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
// 右侧 slider,27.rpx 后居中
|
||||
Positioned(
|
||||
left: 60.rpx - 27.rpx, // 60 是文字宽度,27 是间隔
|
||||
right: 0,
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
child: Center(
|
||||
child: Transform.rotate(
|
||||
angle: -math.pi / 2,
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 451.rpx,
|
||||
maxHeight: 451.rpx,
|
||||
),
|
||||
child: SliderTheme(
|
||||
data: SliderTheme.of(context).copyWith(
|
||||
trackHeight: 60.rpx,
|
||||
thumbShape: RoundSliderThumbShape(
|
||||
enabledThumbRadius: 45.rpx),
|
||||
overlayShape: const RoundSliderOverlayShape(
|
||||
overlayRadius: 20),
|
||||
),
|
||||
child: Slider(
|
||||
value: intensity,
|
||||
min: 1,
|
||||
max: 6,
|
||||
divisions: 7,
|
||||
activeColor: Colors.cyanAccent,
|
||||
inactiveColor: Colors.blue.shade900,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
intensity = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 118.rpx),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 47.rpx), // 👈 控制间隔大小(也可以是 all / symmetric)
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'按摩定时',
|
||||
style: TextStyle(
|
||||
color: Colors.white70, fontSize: 30.rpx),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 74.rpx),
|
||||
Padding(
|
||||
padding: EdgeInsets.fromLTRB(40.rpx, 0, 40.rpx, 0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children:
|
||||
List.generate(timeOptions.length, (index) {
|
||||
final min = timeOptions[index];
|
||||
final isSelected = selectedTime == min;
|
||||
return SizedBox(
|
||||
height: buttonHeight,
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
selectedTime = min;
|
||||
});
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: isSelected
|
||||
? Colors.cyanAccent
|
||||
: Colors.blue.shade900,
|
||||
foregroundColor: isSelected
|
||||
? Colors.black
|
||||
: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
),
|
||||
child: Text('$min分钟'),
|
||||
));
|
||||
}),
|
||||
)),
|
||||
],
|
||||
)),
|
||||
Padding(
|
||||
padding: EdgeInsets.fromLTRB(30.rpx, 0, 30.rpx,
|
||||
81.rpx), // 👈 控制上方间隔(也可以用 all / symmetric)
|
||||
child: OutlinedButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
intensity = 4;
|
||||
selectedTime = 10;
|
||||
});
|
||||
},
|
||||
style: OutlinedButton.styleFrom(
|
||||
side: const BorderSide(color: Color(0XFF74DAE5)),
|
||||
foregroundColor: Colors.cyanAccent,
|
||||
minimumSize: Size(bodysize.maxWidth, 92.rpx),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
),
|
||||
child: const Text('恢复到默认设置'),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 118.rpx),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 47.rpx), // 👈 控制间隔大小(也可以是 all / symmetric)
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'按摩定时',
|
||||
style:
|
||||
TextStyle(color: Colors.white70, fontSize: 30.rpx),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 74.rpx),
|
||||
Padding(
|
||||
padding: EdgeInsets.fromLTRB(40.rpx, 0, 40.rpx, 0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: List.generate(timeOptions.length, (index) {
|
||||
final min = timeOptions[index];
|
||||
final isSelected = selectedTime == min;
|
||||
return SizedBox(
|
||||
height: buttonHeight,
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
selectedTime = min;
|
||||
});
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: isSelected
|
||||
? Colors.cyanAccent
|
||||
: Colors.blue.shade900,
|
||||
foregroundColor:
|
||||
isSelected ? Colors.black : Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
),
|
||||
child: Text('$min分钟'),
|
||||
));
|
||||
}),
|
||||
)),
|
||||
],
|
||||
)),
|
||||
Padding(
|
||||
padding: EdgeInsets.fromLTRB(30.rpx, 0, 30.rpx,
|
||||
81.rpx), // 👈 控制上方间隔(也可以用 all / symmetric)
|
||||
child: OutlinedButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
intensity = 4;
|
||||
selectedTime = 10;
|
||||
});
|
||||
},
|
||||
style: OutlinedButton.styleFrom(
|
||||
side: const BorderSide(color: Color(0XFF74DAE5)),
|
||||
foregroundColor: Colors.cyanAccent,
|
||||
minimumSize: Size(bodysize.maxWidth, 92.rpx),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
),
|
||||
child: const Text('恢复到默认设置'),
|
||||
),
|
||||
),
|
||||
),
|
||||
)));
|
||||
],
|
||||
),
|
||||
),
|
||||
)));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
|
||||
|
||||
class HomeDeviceType extends StatefulWidget {
|
||||
HomeDeviceType({super.key});
|
||||
@override
|
||||
@@ -25,85 +24,85 @@ class _HomeDeviceTypeState extends State<HomeDeviceType> {
|
||||
// }
|
||||
return LayoutBuilder(
|
||||
builder: (context, boxConstraints) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
// leading: returnIconButtom,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'添加设备',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height * 1.123,
|
||||
// decoration: const BoxDecoration(
|
||||
// image: DecorationImage(
|
||||
// image: AssetImage("assets/images/new_background.png"),
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// ),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
48.rpx, 24.rpx, 0, 0),
|
||||
child: Text(
|
||||
'选择类型',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
_buildControlCard(context),
|
||||
],
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
// leading: returnIconButtom,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'添加设备',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height * 1.123,
|
||||
// decoration: const BoxDecoration(
|
||||
// image: DecorationImage(
|
||||
// image: AssetImage("assets/images/new_background.png"),
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// ),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(48.rpx, 24.rpx, 0, 0),
|
||||
child: Text(
|
||||
'选择类型',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
_buildControlCard(context),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
),
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class _MattressControlPageState extends State<MattressControlPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
// onTap: () => FocusScope.of(context).unfocus(),
|
||||
// // onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
@@ -23,7 +23,7 @@ class ShareDeviceDetailWidget extends GetView {
|
||||
type.value = shareInfo['op_type'];
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Scaffold(
|
||||
key: scaffoldKey,
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
|
||||
@@ -44,7 +44,7 @@ class _MhAboutUsPageState extends State<MhAboutUsPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
@@ -24,186 +24,185 @@ class AddressListPage extends GetView<AddressListController> {
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
bodysize = cc;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'地址管理',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'地址管理',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: Container(
|
||||
margin: EdgeInsets.only(top: 30.rpx),
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 1,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
// Obx(() {
|
||||
// if (controller.model.addressList!.isEmpty) {
|
||||
// // 如果地址列表为空,显示 EmptyMessageWidget
|
||||
// return Expanded(child: NullDataWidget());
|
||||
// } else {
|
||||
// // 如果地址列表不为空,显示地址列表
|
||||
// return Expanded(
|
||||
// child: Container(
|
||||
// width: bodysize!.maxWidth,
|
||||
// height: bodysize!.maxHeight * 1,
|
||||
// decoration: BoxDecoration(),
|
||||
// child: Obx(() => ListView(
|
||||
// shrinkWrap: true,
|
||||
// scrollDirection: Axis.vertical,
|
||||
// children: (controller.model.addressList!
|
||||
// .asMap()
|
||||
// .entries
|
||||
// .map((e) => AddressModuleWidget(
|
||||
// index: e.key,
|
||||
// addressListController:
|
||||
// controller,
|
||||
// ))
|
||||
// .toList() as List<Widget>)
|
||||
// .divide(const SizedBox(height: 10))
|
||||
// .addToEnd(const SizedBox(
|
||||
// height:
|
||||
// AppConstants.list_end_height)),
|
||||
// )),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }),
|
||||
Obx(() {
|
||||
final originList = controller.model.addressList ?? [];
|
||||
|
||||
// 拆出默认地址
|
||||
final defaultItem = originList.firstWhere(
|
||||
(e) => e["default"] == 1,
|
||||
orElse: () => null,
|
||||
);
|
||||
|
||||
// 其他非默认地址
|
||||
final others =
|
||||
originList.where((e) => e["default"] != 1).toList();
|
||||
|
||||
// 新的展示顺序列表(默认地址排前面)
|
||||
final reorderedList = [
|
||||
if (defaultItem != null) defaultItem,
|
||||
...others,
|
||||
];
|
||||
|
||||
return Expanded(
|
||||
child: ListView(
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.zero,
|
||||
children: reorderedList
|
||||
.map((item) {
|
||||
final realIndex =
|
||||
originList.indexOf(item); // 保留原始 index
|
||||
return AddressModuleWidget(
|
||||
index: realIndex,
|
||||
addressListController: controller,
|
||||
);
|
||||
})
|
||||
.toList()
|
||||
.divide(const SizedBox(height: 10))
|
||||
.addToEnd(const SizedBox(
|
||||
height: AppConstants.list_end_height)),
|
||||
),
|
||||
);
|
||||
}),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0, 1),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
15, 15, 15, AppConstants.page_button_bottom_padding),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 0.056,
|
||||
decoration: BoxDecoration(
|
||||
// color: Color(0xFFF6F6F6),
|
||||
border: Border.all(width: 0, color: Color(0XFF85F5FF)),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: Container(
|
||||
margin: EdgeInsets.only(top: 30.rpx),
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 1,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
// Obx(() {
|
||||
// if (controller.model.addressList!.isEmpty) {
|
||||
// // 如果地址列表为空,显示 EmptyMessageWidget
|
||||
// return Expanded(child: NullDataWidget());
|
||||
// } else {
|
||||
// // 如果地址列表不为空,显示地址列表
|
||||
// return Expanded(
|
||||
// child: Container(
|
||||
// width: bodysize!.maxWidth,
|
||||
// height: bodysize!.maxHeight * 1,
|
||||
// decoration: BoxDecoration(),
|
||||
// child: Obx(() => ListView(
|
||||
// shrinkWrap: true,
|
||||
// scrollDirection: Axis.vertical,
|
||||
// children: (controller.model.addressList!
|
||||
// .asMap()
|
||||
// .entries
|
||||
// .map((e) => AddressModuleWidget(
|
||||
// index: e.key,
|
||||
// addressListController:
|
||||
// controller,
|
||||
// ))
|
||||
// .toList() as List<Widget>)
|
||||
// .divide(const SizedBox(height: 10))
|
||||
// .addToEnd(const SizedBox(
|
||||
// height:
|
||||
// AppConstants.list_end_height)),
|
||||
// )),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }),
|
||||
Obx(() {
|
||||
final originList = controller.model.addressList ?? [];
|
||||
|
||||
// 拆出默认地址
|
||||
final defaultItem = originList.firstWhere(
|
||||
(e) => e["default"] == 1,
|
||||
orElse: () => null,
|
||||
);
|
||||
|
||||
// 其他非默认地址
|
||||
final others =
|
||||
originList.where((e) => e["default"] != 1).toList();
|
||||
|
||||
// 新的展示顺序列表(默认地址排前面)
|
||||
final reorderedList = [
|
||||
if (defaultItem != null) defaultItem,
|
||||
...others,
|
||||
];
|
||||
|
||||
return Expanded(
|
||||
child: ListView(
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.zero,
|
||||
children: reorderedList
|
||||
.map((item) {
|
||||
final realIndex =
|
||||
originList.indexOf(item); // 保留原始 index
|
||||
return AddressModuleWidget(
|
||||
index: realIndex,
|
||||
addressListController: controller,
|
||||
);
|
||||
})
|
||||
.toList()
|
||||
.divide(const SizedBox(height: 10))
|
||||
.addToEnd(const SizedBox(
|
||||
height: AppConstants.list_end_height)),
|
||||
),
|
||||
);
|
||||
}),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0, 1),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(15, 15, 15,
|
||||
AppConstants.page_button_bottom_padding),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 0.056,
|
||||
decoration: BoxDecoration(
|
||||
// color: Color(0xFFF6F6F6),
|
||||
border:
|
||||
Border.all(width: 0, color: Color(0XFF85F5FF)),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
child: TextButton(
|
||||
onPressed: () {
|
||||
controller.model.address = {'default': 0};
|
||||
controller.model.type = 1;
|
||||
Get.toNamed("/editAddressPage");
|
||||
},
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: Colors.transparent,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: TextButton(
|
||||
onPressed: () {
|
||||
controller.model.address = {'default': 0};
|
||||
controller.model.type = 1;
|
||||
Get.toNamed("/editAddressPage");
|
||||
},
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: Colors.transparent,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 24), // 按钮内边距
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// Baseline(
|
||||
// baselineType: TextBaseline.alphabetic,
|
||||
// baseline: AppFontsize.normal_text_size *
|
||||
// 1.6, // 调整基线位置
|
||||
SvgPicture.asset(
|
||||
'assets/img/icon/plus.svg',
|
||||
width: 42.rpx,
|
||||
height: 42.rpx,
|
||||
),
|
||||
|
||||
SizedBox(width: 10), // 加号和文字间距
|
||||
Text(
|
||||
'添加新地址',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF85F5FF),
|
||||
fontSize: AppFontsize.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 24), // 按钮内边距
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// Baseline(
|
||||
// baselineType: TextBaseline.alphabetic,
|
||||
// baseline: AppFontsize.normal_text_size *
|
||||
// 1.6, // 调整基线位置
|
||||
SvgPicture.asset(
|
||||
'assets/img/icon/plus.svg',
|
||||
width: 42.rpx,
|
||||
height: 42.rpx,
|
||||
),
|
||||
|
||||
SizedBox(width: 10), // 加号和文字间距
|
||||
Text(
|
||||
'添加新地址',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF85F5FF),
|
||||
fontSize: AppFontsize.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
));
|
||||
),
|
||||
),
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class _ApplyRepairSuccessState extends State<ApplyRepairSuccess> {
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -67,7 +67,7 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
||||
bodysize = cc;
|
||||
final isBind = obsData['bind_type'] == 1;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
@@ -29,7 +29,7 @@ class BookInfoPage extends GetView<BookInfoController> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
@@ -24,203 +24,202 @@ class BookSuccessPage extends GetView {
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
bodysize = cc;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
// key: scaffoldKey,
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
// leading: returnIconButtomAddCallback(() {
|
||||
// controller.saveDataApi();
|
||||
// updateParm(isShowToast: false);
|
||||
// }),
|
||||
// leading: returnIconButtomNew,
|
||||
title: Container(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'我要预约',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
// key: scaffoldKey,
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
// leading: returnIconButtomAddCallback(() {
|
||||
// controller.saveDataApi();
|
||||
// updateParm(isShowToast: false);
|
||||
// }),
|
||||
// leading: returnIconButtomNew,
|
||||
title: Container(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
|
||||
body: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 1,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
width: bodysize!.maxWidth,
|
||||
margin: EdgeInsets.only(top: 90.rpx),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'我要预约',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
Container(
|
||||
width: 148.rpx,
|
||||
height: 148.rpx,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Image.asset(
|
||||
'assets/images/success.png',
|
||||
fit: BoxFit.contain,
|
||||
color: Color(0xFF84F5FF),
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0, 0),
|
||||
child: Text(
|
||||
'预约成功!',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: 30.rpx,
|
||||
color: Colors.white,
|
||||
letterSpacing: 0,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
].divide(SizedBox(height: 30.rpx)),
|
||||
),
|
||||
),
|
||||
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
|
||||
body: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 1,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
width: bodysize!.maxWidth,
|
||||
margin: EdgeInsets.only(top: 90.rpx),
|
||||
Container(
|
||||
margin:
|
||||
EdgeInsets.only(left: 30.rpx, right: 30.rpx, top: 55.rpx),
|
||||
width: bodysize!.maxWidth,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF003058),
|
||||
borderRadius: BorderRadius.circular(16.rpx),
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
width: 148.rpx,
|
||||
height: 148.rpx,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Image.asset(
|
||||
'assets/images/success.png',
|
||||
fit: BoxFit.contain,
|
||||
color: Color(0xFF84F5FF),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0, 0),
|
||||
child: Text(
|
||||
'预约成功!',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: 30.rpx,
|
||||
color: Colors.white,
|
||||
letterSpacing: 0,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(height: 30.rpx)),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 30.rpx, right: 30.rpx, top: 55.rpx),
|
||||
width: bodysize!.maxWidth,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF003058),
|
||||
borderRadius: BorderRadius.circular(16.rpx),
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(height: 20), // 上间距
|
||||
for (var item in infoList)
|
||||
Container(
|
||||
height: 60.rpx,
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 35.rpx),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
item['label']!,
|
||||
style: TextStyle(
|
||||
color: Color(0XFF929699),
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 30.rpx),
|
||||
Text(
|
||||
item['value']!,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
|
||||
SizedBox(height: 60.rpx), // 空间隔断
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 35),
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(height: 20), // 上间距
|
||||
for (var item in infoList)
|
||||
Container(
|
||||
height: 60.rpx,
|
||||
padding: EdgeInsets.symmetric(horizontal: 35.rpx),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 200.rpx,
|
||||
height: 60.rpx,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFF84F5FF),
|
||||
padding: EdgeInsets.zero, // 去除文字内边距
|
||||
tapTargetSize: MaterialTapTargetSize
|
||||
.shrinkWrap, // 去除额外点击区域
|
||||
// shape:
|
||||
// RoundedRectangleBorder(), // 可选:去除默认圆角
|
||||
),
|
||||
onPressed: () {},
|
||||
child: Center(
|
||||
// 保证文字居中
|
||||
child: Text(
|
||||
"关闭",
|
||||
style: TextStyle(
|
||||
color: Color(0XFF011D33),
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
SizedBox(width: 60.rpx),
|
||||
SizedBox(
|
||||
width: 200.rpx,
|
||||
height: 60.rpx,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFF84F5FF),
|
||||
padding: EdgeInsets.zero, // 去除文字内边距
|
||||
tapTargetSize: MaterialTapTargetSize
|
||||
.shrinkWrap, // 去除额外点击区域
|
||||
// shape:
|
||||
// RoundedRectangleBorder(), // 可选:去除默认圆角
|
||||
),
|
||||
onPressed: () {},
|
||||
child: Center(
|
||||
// 保证文字居中
|
||||
child: Text(
|
||||
"我的预约",
|
||||
style: TextStyle(
|
||||
color: Color(0XFF011D33),
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
))
|
||||
Text(
|
||||
item['label']!,
|
||||
style: TextStyle(
|
||||
color: Color(0XFF929699),
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 30.rpx),
|
||||
Text(
|
||||
item['value']!,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
|
||||
SizedBox(height: 80.rpx), // 下间距
|
||||
],
|
||||
)),
|
||||
),
|
||||
],
|
||||
SizedBox(height: 60.rpx), // 空间隔断
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 35),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 200.rpx,
|
||||
height: 60.rpx,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFF84F5FF),
|
||||
padding: EdgeInsets.zero, // 去除文字内边距
|
||||
tapTargetSize: MaterialTapTargetSize
|
||||
.shrinkWrap, // 去除额外点击区域
|
||||
// shape:
|
||||
// RoundedRectangleBorder(), // 可选:去除默认圆角
|
||||
),
|
||||
onPressed: () {},
|
||||
child: Center(
|
||||
// 保证文字居中
|
||||
child: Text(
|
||||
"关闭",
|
||||
style: TextStyle(
|
||||
color: Color(0XFF011D33),
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
SizedBox(width: 60.rpx),
|
||||
SizedBox(
|
||||
width: 200.rpx,
|
||||
height: 60.rpx,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFF84F5FF),
|
||||
padding: EdgeInsets.zero, // 去除文字内边距
|
||||
tapTargetSize: MaterialTapTargetSize
|
||||
.shrinkWrap, // 去除额外点击区域
|
||||
// shape:
|
||||
// RoundedRectangleBorder(), // 可选:去除默认圆角
|
||||
),
|
||||
onPressed: () {},
|
||||
child: Center(
|
||||
// 保证文字居中
|
||||
child: Text(
|
||||
"我的预约",
|
||||
style: TextStyle(
|
||||
color: Color(0XFF011D33),
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(height: 80.rpx), // 下间距
|
||||
],
|
||||
)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
));
|
||||
),
|
||||
),
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,305 +18,296 @@ class DeletedAccountPage extends GetView {
|
||||
bodysize = cc;
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'注销账号',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'注销账号',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
key: scaffoldKey,
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 1,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: 100,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
centerTitle: false,
|
||||
),
|
||||
key: scaffoldKey,
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 1,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: 100,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
15, 33, 15, 0),
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
15, 33, 15, 0),
|
||||
21, 0, 22, 0),
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
21, 0, 22, 0),
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
child: Image.asset(
|
||||
'assets/images/delete_account.png',
|
||||
fit: BoxFit.cover,
|
||||
color: Color(0XFF84F5FF),
|
||||
),
|
||||
),
|
||||
const Text(
|
||||
"注销智慧眠花糖账号",
|
||||
style: TextStyle(
|
||||
fontSize: 20, // 设置字体大小
|
||||
color: Color(0xFFFFFFFF),
|
||||
// decoration: TextDecoration.underline, // 添加下划线
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
child: Image.asset(
|
||||
'assets/images/delete_account.png',
|
||||
fit: BoxFit.cover,
|
||||
color: Color(0XFF84F5FF),
|
||||
),
|
||||
),
|
||||
const Text(
|
||||
"注销智慧眠花糖账号",
|
||||
style: TextStyle(
|
||||
fontSize: 20, // 设置字体大小
|
||||
color: Color(0xFFFFFFFF),
|
||||
// decoration: TextDecoration.underline, // 添加下划线
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.spaceBetween,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
RichText(
|
||||
text: TextSpan(
|
||||
text: "账号注销后,你将无法使用以下功能,",
|
||||
RichText(
|
||||
text: TextSpan(
|
||||
text: "账号注销后,你将无法使用以下功能,",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size, // 设置字体大小
|
||||
color:
|
||||
Color(0xFF9AA0B3), // 默认颜色
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
"并且当前有绑定以及被分享的智能床、智能床垫等设备的账号不能注销",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size, // 设置字体大小
|
||||
color: Color(
|
||||
0xFF9AA0B3), // 默认颜色
|
||||
.normal_text_size,
|
||||
color: const Color(
|
||||
0xFFFF7159), // 设置为#E45E91的颜色
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
"并且当前有绑定以及被分享的智能床、智能床垫等设备的账号不能注销",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
color: const Color(
|
||||
0xFFFF7159), // 设置为#E45E91的颜色
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text:
|
||||
",可先进行解绑后再进行注销操作。",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
color:
|
||||
Color(0xFF9AA0B3),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 24,
|
||||
),
|
||||
Text(
|
||||
"无法控制智能床、智能床垫等设备",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.title_size, // 设置字体大小
|
||||
color:
|
||||
const Color(0xFFFFFFFF),
|
||||
TextSpan(
|
||||
text: ",可先进行解绑后再进行注销操作。",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
color: Color(0xFF9AA0B3),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 6,
|
||||
),
|
||||
Text(
|
||||
"你将无法控制你的智能床、智能床垫等设备,以及与其相关的各种操作。",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size, // 设置字体大小
|
||||
color: Color(0xFF9AA0B3),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 24,
|
||||
),
|
||||
Text(
|
||||
"无法查询睡眠报告和体征数据",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.title_size, // 设置字体大小
|
||||
color:
|
||||
const Color(0xFFFFFFFF),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 6,
|
||||
),
|
||||
Text(
|
||||
"注销账号后你将查询不到你以前的睡眠报告和实时数据。",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size, // 设置字体大小
|
||||
color: Color(0xFF9AA0B3),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 24,
|
||||
),
|
||||
Text(
|
||||
"无法使用的其他功能",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.title_size, // 设置字体大小
|
||||
color:
|
||||
const Color(0xFFFFFFFF),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 6,
|
||||
),
|
||||
Text(
|
||||
"包含设备报修、门店体验预约等。",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size, // 设置字体大小
|
||||
color: Color(0xFF9AA0B3),
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
]
|
||||
.divide(
|
||||
const SizedBox(height: 24))
|
||||
.addToStart(
|
||||
const SizedBox(height: 14))
|
||||
.addToEnd(
|
||||
const SizedBox(height: 17)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 24,
|
||||
),
|
||||
Text(
|
||||
"无法控制智能床、智能床垫等设备",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.title_size, // 设置字体大小
|
||||
color: const Color(0xFFFFFFFF),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 6,
|
||||
),
|
||||
Text(
|
||||
"你将无法控制你的智能床、智能床垫等设备,以及与其相关的各种操作。",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size, // 设置字体大小
|
||||
color: Color(0xFF9AA0B3),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 24,
|
||||
),
|
||||
Text(
|
||||
"无法查询睡眠报告和体征数据",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.title_size, // 设置字体大小
|
||||
color: const Color(0xFFFFFFFF),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 6,
|
||||
),
|
||||
Text(
|
||||
"注销账号后你将查询不到你以前的睡眠报告和实时数据。",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size, // 设置字体大小
|
||||
color: Color(0xFF9AA0B3),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 24,
|
||||
),
|
||||
Text(
|
||||
"无法使用的其他功能",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.title_size, // 设置字体大小
|
||||
color: const Color(0xFFFFFFFF),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 6,
|
||||
),
|
||||
Text(
|
||||
"包含设备报修、门店体验预约等。",
|
||||
style: TextStyle(
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size, // 设置字体大小
|
||||
color: Color(0xFF9AA0B3),
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
]
|
||||
.divide(const SizedBox(height: 24))
|
||||
.addToStart(
|
||||
const SizedBox(height: 14))
|
||||
.addToEnd(const SizedBox(height: 17)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
15, 0, 15, AppConstants.page_button_bottom_padding),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 0.056,
|
||||
// decoration: BoxDecoration(
|
||||
// color:
|
||||
// FlutterFlowTheme.of(context).secondaryBackground,
|
||||
// ),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 0.056,
|
||||
decoration: BoxDecoration(
|
||||
// color: FlutterFlowTheme.of(context)
|
||||
// .secondaryBackground,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
// showCustomConfirmDialog(context, "是否确认注销?")
|
||||
// .then((v) async {
|
||||
// if (v != "confirm") {
|
||||
// return;
|
||||
// }
|
||||
// LoginController loginController = Get.find();
|
||||
// UserInfoController userInfoController =
|
||||
// Get.find<UserInfoController>();
|
||||
// var code = await loginController.deletedAccount();
|
||||
// if (code != null && code == 1) {
|
||||
// final box = GetStorage();
|
||||
// box.remove('user');
|
||||
// box.remove('token');
|
||||
// userInfoController.model.token = null;
|
||||
// userInfoController.model.user = null;
|
||||
// userInfoController.model.login = 0;
|
||||
// userInfoController.model.message = 0;
|
||||
// GlobalController globalController =
|
||||
// Get.find<GlobalController>();
|
||||
// globalController.resetParmAll();
|
||||
// Get.offAllNamed("/loginPage");
|
||||
// }
|
||||
// });
|
||||
},
|
||||
text: '注销账号',
|
||||
options: FFButtonOptions(
|
||||
height: 40,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24, 0, 24, 0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0, 0, 0, 0),
|
||||
color: const Color(0xFFFF7159),
|
||||
textStyle: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: AppFontsize.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
elevation: 0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
15, 0, 15, AppConstants.page_button_bottom_padding),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 0.056,
|
||||
// decoration: BoxDecoration(
|
||||
// color:
|
||||
// FlutterFlowTheme.of(context).secondaryBackground,
|
||||
// ),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 0.056,
|
||||
decoration: BoxDecoration(
|
||||
// color: FlutterFlowTheme.of(context)
|
||||
// .secondaryBackground,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
// showCustomConfirmDialog(context, "是否确认注销?")
|
||||
// .then((v) async {
|
||||
// if (v != "confirm") {
|
||||
// return;
|
||||
// }
|
||||
// LoginController loginController = Get.find();
|
||||
// UserInfoController userInfoController =
|
||||
// Get.find<UserInfoController>();
|
||||
// var code = await loginController.deletedAccount();
|
||||
// if (code != null && code == 1) {
|
||||
// final box = GetStorage();
|
||||
// box.remove('user');
|
||||
// box.remove('token');
|
||||
// userInfoController.model.token = null;
|
||||
// userInfoController.model.user = null;
|
||||
// userInfoController.model.login = 0;
|
||||
// userInfoController.model.message = 0;
|
||||
// GlobalController globalController =
|
||||
// Get.find<GlobalController>();
|
||||
// globalController.resetParmAll();
|
||||
// Get.offAllNamed("/loginPage");
|
||||
// }
|
||||
// });
|
||||
},
|
||||
text: '注销账号',
|
||||
options: FFButtonOptions(
|
||||
height: 40,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24, 0, 24, 0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0),
|
||||
color: const Color(0xFFFF7159),
|
||||
textStyle: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: AppFontsize.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
elevation: 0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
));
|
||||
),
|
||||
),
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
@@ -50,7 +50,7 @@ class _MHTBindDeviceTypePageState extends State<MHTBindDeviceTypePage> {
|
||||
}
|
||||
return LayoutBuilder(
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
@@ -209,7 +209,7 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
|
||||
ef.log("$e");
|
||||
} finally {
|
||||
setState(() {
|
||||
isScanning = false;
|
||||
isScanning = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -287,7 +287,7 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, boxConstraints) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
@@ -64,7 +64,7 @@ class _MHTCalibrationPageCopyState extends State<MHTCalibrationPageCopy> {
|
||||
return WillPopScope(
|
||||
child: LayoutBuilder(
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
@@ -73,7 +73,7 @@ class _MHTCalibrationPageState extends State<MHTCalibrationPage> {
|
||||
return WillPopScope(
|
||||
child: LayoutBuilder(
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
@@ -108,7 +108,8 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
||||
|
||||
// 导航到下一页
|
||||
if (blueteethBindController.wifiStatus.value != 1) {
|
||||
showConfirmDialog(context, Container(), "未配置网络提示".tr, onConfirm: () async {
|
||||
showConfirmDialog(context, Container(), "未配置网络提示".tr,
|
||||
onConfirm: () async {
|
||||
_cleanupResources();
|
||||
await _disconnectDevice();
|
||||
Get.toNamed("/calibrationPage");
|
||||
@@ -124,7 +125,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
@@ -1104,7 +1105,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _disconnectDevice() async {
|
||||
Future<void> _disconnectDevice() async {
|
||||
try {
|
||||
THapp bledevice = THapp(device: widget.deviceInfo.scanResult.device);
|
||||
await bledevice.disconnect();
|
||||
|
||||
@@ -33,107 +33,107 @@ class _DeviceListPageState extends State<DeviceListPage> {
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
bodysize = cc;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
// leading: returnIconButtomAddCallback(() {
|
||||
// controller.saveDataApi();
|
||||
// updateParm(isShowToast: false);
|
||||
// }),
|
||||
// leading: returnIconButtomNew,
|
||||
title: Container(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'设备列表',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
child: Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
// leading: returnIconButtomAddCallback(() {
|
||||
// controller.saveDataApi();
|
||||
// updateParm(isShowToast: false);
|
||||
// }),
|
||||
// leading: returnIconButtomNew,
|
||||
title: Container(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'设备列表',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Container(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0, 10, 0, 23),
|
||||
child: SearchWidget(
|
||||
keyword: controller.model.keyword,
|
||||
color: controller.model.color,
|
||||
hint: "检索设备",
|
||||
onChange: (d) {
|
||||
controller.model.keyword = d;
|
||||
},
|
||||
findCallback: () {
|
||||
controller.getDeviceList();
|
||||
},
|
||||
),
|
||||
),
|
||||
Obx(() {
|
||||
if (controller.model.deviceList == null ||
|
||||
controller.model.deviceList.isEmpty) {
|
||||
return Expanded(child: NullDataWidget());
|
||||
}
|
||||
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Container(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0, 10, 0, 23),
|
||||
child: SearchWidget(
|
||||
keyword: controller.model.keyword,
|
||||
color: controller.model.color,
|
||||
hint: "检索设备",
|
||||
onChange: (d) {
|
||||
controller.model.keyword = d;
|
||||
},
|
||||
findCallback: () {
|
||||
controller.getDeviceList();
|
||||
},
|
||||
),
|
||||
// 如果 deviceList 不为空,渲染列表
|
||||
return Expanded(
|
||||
child: ListView(
|
||||
shrinkWrap: true,
|
||||
scrollDirection: Axis.vertical,
|
||||
children: controller.model.deviceList
|
||||
.asMap()
|
||||
.entries
|
||||
.map((e) => DeviceInfoWidget(
|
||||
index: e.key,
|
||||
deviceListController: controller,
|
||||
))
|
||||
.toList()
|
||||
.divide(const SizedBox(height: 10))
|
||||
.addToEnd(const SizedBox(height: 100)),
|
||||
),
|
||||
Obx(() {
|
||||
if (controller.model.deviceList == null ||
|
||||
controller.model.deviceList.isEmpty) {
|
||||
return Expanded(child: NullDataWidget());
|
||||
}
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
// 如果 deviceList 不为空,渲染列表
|
||||
return Expanded(
|
||||
child: ListView(
|
||||
shrinkWrap: true,
|
||||
scrollDirection: Axis.vertical,
|
||||
children: controller.model.deviceList
|
||||
.asMap()
|
||||
.entries
|
||||
.map((e) => DeviceInfoWidget(
|
||||
index: e.key,
|
||||
deviceListController: controller,
|
||||
))
|
||||
.toList()
|
||||
.divide(const SizedBox(height: 10))
|
||||
.addToEnd(const SizedBox(height: 100)),
|
||||
),
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
)
|
||||
// Container(
|
||||
// width: bodysize!.maxWidth,
|
||||
// height: bodysize!.maxHeight,
|
||||
|
||||
// Container(
|
||||
// width: bodysize!.maxWidth,
|
||||
// height: bodysize!.maxHeight,
|
||||
|
||||
// ),
|
||||
),
|
||||
));
|
||||
// ),
|
||||
),
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,177 +36,176 @@ class DevicePeopleInfo extends GetView<PeopleInfoController> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
controller.getPeoples (data['mac']);
|
||||
controller.getPeoples(data['mac']);
|
||||
});
|
||||
return LayoutBuilder(
|
||||
builder: (context, boxConstraints) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
title: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
title: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
automaticallyImplyLeading: false,
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'详情',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Obx(
|
||||
() => Container(
|
||||
padding: EdgeInsets.only(
|
||||
left: 30.rpx, right: 30.rpx, top: 30.rpx),
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height * 1.123,
|
||||
// decoration: BoxDecoration(
|
||||
// // color: AppColors.bg_color,
|
||||
// image: DecorationImage(
|
||||
// image: AssetImage("assets/images/background.png"),
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// ),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
ClickableContainer(
|
||||
backgroundColor: Color(0xFFFF036060),
|
||||
highlightColor: Colors.transparent,
|
||||
borderRadius: 16.rpx,
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
30.rpx, 20.rpx, 0, 20.rpx),
|
||||
onTap: () {},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(16.rpx)),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'设备信息',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
getInfoRow(
|
||||
context, "名称:${data["name"] ?? "-"}"),
|
||||
getInfoRow(context,
|
||||
"房间:${data["roomName"] ?? "-"}"),
|
||||
getInfoRow(
|
||||
context,
|
||||
"设备状态:${data["status"]?["status"] == 1 ? "已绑定" : data["status"]?["status"] == 0 ? "已绑定" : "-"}",
|
||||
),
|
||||
getInfoRow(
|
||||
context, "MAC:${data["mac"] ?? "-"}"),
|
||||
],
|
||||
),
|
||||
)),
|
||||
if (controller.model.peopleList.isNotEmpty)
|
||||
...List.generate(controller.model.peopleList.length,
|
||||
(index) {
|
||||
final person = controller.model.peopleList[index];
|
||||
// String location_ = '';
|
||||
// if ("${data["bindMacB"]}".length > 6 &&
|
||||
// (person["direction"] == 1 ||
|
||||
// person["direction"] == 2)) {
|
||||
// location_ =
|
||||
// person["direction"] == 1 ? '左侧' : '右侧';
|
||||
// }
|
||||
|
||||
return ClickableContainer(
|
||||
backgroundColor: Color(0xFF003058),
|
||||
highlightColor: Color(0xFF036060),
|
||||
borderRadius: 16.rpx,
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
30.rpx, 20.rpx, 30.rpx, 20.rpx),
|
||||
onTap: () {},
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'人员资料${index == 0 ? "A" : "B"}',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 32.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
getInfoRow(
|
||||
context, "姓名:${person["name"] ?? "-"}"),
|
||||
getInfoRow(context,
|
||||
"性别:${person["gender"] == null ? "-" : (person["gender"] == 1 ? "男" : "女")}"),
|
||||
getInfoRow(context,
|
||||
"身高:${person["height"] == null ? "-" : "${person["height"]}cm"}"),
|
||||
getInfoRow(context,
|
||||
"体重:${person["weight"] == null ? "-" : "${person["weight"]}kg"}"),
|
||||
getInfoRow(context,
|
||||
"生日:${person["birthday"] == null ? "-" : time_08_Formatter_pattern(person["birthday"], "yyyy年MM月dd日")}"),
|
||||
getInfoRow(
|
||||
context, "电话:${person["tel"] ?? "-"}"),
|
||||
getInfoRow(context,
|
||||
"紧急联系人:${person["contact"] ?? "-"}"),
|
||||
],
|
||||
),
|
||||
);
|
||||
})
|
||||
].divide(SizedBox(
|
||||
height: 25.rpx,
|
||||
)),
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
automaticallyImplyLeading: false,
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'详情',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Obx(
|
||||
() => Container(
|
||||
padding:
|
||||
EdgeInsets.only(left: 30.rpx, right: 30.rpx, top: 30.rpx),
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height * 1.123,
|
||||
// decoration: BoxDecoration(
|
||||
// // color: AppColors.bg_color,
|
||||
// image: DecorationImage(
|
||||
// image: AssetImage("assets/images/background.png"),
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// ),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
ClickableContainer(
|
||||
backgroundColor: Color(0xFFFF036060),
|
||||
highlightColor: Colors.transparent,
|
||||
borderRadius: 16.rpx,
|
||||
padding:
|
||||
EdgeInsets.fromLTRB(30.rpx, 20.rpx, 0, 20.rpx),
|
||||
onTap: () {},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16.rpx)),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'设备信息',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
getInfoRow(
|
||||
context, "名称:${data["name"] ?? "-"}"),
|
||||
getInfoRow(
|
||||
context, "房间:${data["roomName"] ?? "-"}"),
|
||||
getInfoRow(
|
||||
context,
|
||||
"设备状态:${data["status"]?["status"] == 1 ? "已绑定" : data["status"]?["status"] == 0 ? "已绑定" : "-"}",
|
||||
),
|
||||
getInfoRow(
|
||||
context, "MAC:${data["mac"] ?? "-"}"),
|
||||
],
|
||||
),
|
||||
)),
|
||||
if (controller.model.peopleList.isNotEmpty)
|
||||
...List.generate(controller.model.peopleList.length,
|
||||
(index) {
|
||||
final person = controller.model.peopleList[index];
|
||||
// String location_ = '';
|
||||
// if ("${data["bindMacB"]}".length > 6 &&
|
||||
// (person["direction"] == 1 ||
|
||||
// person["direction"] == 2)) {
|
||||
// location_ =
|
||||
// person["direction"] == 1 ? '左侧' : '右侧';
|
||||
// }
|
||||
|
||||
return ClickableContainer(
|
||||
backgroundColor: Color(0xFF003058),
|
||||
highlightColor: Color(0xFF036060),
|
||||
borderRadius: 16.rpx,
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
30.rpx, 20.rpx, 30.rpx, 20.rpx),
|
||||
onTap: () {},
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'人员资料${index == 0 ? "A" : "B"}',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 32.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
getInfoRow(
|
||||
context, "姓名:${person["name"] ?? "-"}"),
|
||||
getInfoRow(context,
|
||||
"性别:${person["gender"] == null ? "-" : (person["gender"] == 1 ? "男" : "女")}"),
|
||||
getInfoRow(context,
|
||||
"身高:${person["height"] == null ? "-" : "${person["height"]}cm"}"),
|
||||
getInfoRow(context,
|
||||
"体重:${person["weight"] == null ? "-" : "${person["weight"]}kg"}"),
|
||||
getInfoRow(context,
|
||||
"生日:${person["birthday"] == null ? "-" : time_08_Formatter_pattern(person["birthday"], "yyyy年MM月dd日")}"),
|
||||
getInfoRow(
|
||||
context, "电话:${person["tel"] ?? "-"}"),
|
||||
getInfoRow(context,
|
||||
"紧急联系人:${person["contact"] ?? "-"}"),
|
||||
],
|
||||
),
|
||||
);
|
||||
})
|
||||
].divide(SizedBox(
|
||||
height: 25.rpx,
|
||||
)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
),
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -47,7 +47,7 @@ class EditAddressPage extends GetView<AddressController>
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
bodysize = cc;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
@@ -62,133 +62,130 @@ class _ExperienceStorePageState extends State<ExperienceStorePage> {
|
||||
bodysize = cc;
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
// key: scaffoldKey,
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'预约体验',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
Positioned(
|
||||
right: 30.rpx,
|
||||
child: ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Color(0xFF055466),
|
||||
padding: EdgeInsets.only(left: 0),
|
||||
onTap: () {
|
||||
TopSlideNotification.show(context,
|
||||
text: "待开发功能".tr);
|
||||
// Get.toNamed("/myExperiencePage");
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/history_store.svg',
|
||||
width: 35.rpx,
|
||||
height: 35.rpx,
|
||||
color: Colors.white,
|
||||
)))
|
||||
],
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
// key: scaffoldKey,
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'预约体验',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
centerTitle: false,
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
Positioned(
|
||||
right: 30.rpx,
|
||||
child: ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Color(0xFF055466),
|
||||
padding: EdgeInsets.only(left: 0),
|
||||
onTap: () {
|
||||
TopSlideNotification.show(context,
|
||||
text: "待开发功能".tr);
|
||||
// Get.toNamed("/myExperiencePage");
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/history_store.svg',
|
||||
width: 35.rpx,
|
||||
height: 35.rpx,
|
||||
color: Colors.white,
|
||||
)))
|
||||
],
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 1,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
//todo
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 1,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
//todo
|
||||
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 40.rpx, 0, 38.rpx),
|
||||
child: SearchWidget(
|
||||
keyword: controller.model.keyword,
|
||||
color: controller.model.color,
|
||||
hint: "请输入门店名称",
|
||||
onChange: (d) {
|
||||
controller.model.keyword = d;
|
||||
},
|
||||
findCallback: () {
|
||||
// controller.page = 0;
|
||||
// controller.getData();
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
Obx(() {
|
||||
if (controller
|
||||
.model.experienceStoreModelList.length ==
|
||||
0) {
|
||||
return CircularProgressIndicator(
|
||||
strokeWidth: 1,
|
||||
valueColor:
|
||||
AlwaysStoppedAnimation<Color>(Colors.white),
|
||||
);
|
||||
} else {
|
||||
return Container();
|
||||
}
|
||||
}),
|
||||
|
||||
Expanded(
|
||||
child: Obx(() => ListView(
|
||||
controller: scrollController,
|
||||
shrinkWrap: true,
|
||||
scrollDirection: Axis.vertical,
|
||||
children: List.generate(
|
||||
controller
|
||||
.model
|
||||
.experienceStoreModelList
|
||||
.length, (index) {
|
||||
return ExperienceStoreWidget(
|
||||
index: index,
|
||||
data: controller.model
|
||||
.experienceStoreModelList[index]);
|
||||
})
|
||||
.divide(const SizedBox(
|
||||
height: 25,
|
||||
))
|
||||
.addToStart(SizedBox(
|
||||
height: AppConstants.list_start_height,
|
||||
))
|
||||
.addToEnd(SizedBox(
|
||||
height: AppConstants.list_ano_end_height,
|
||||
))))),
|
||||
],
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0, 40.rpx, 0, 38.rpx),
|
||||
child: SearchWidget(
|
||||
keyword: controller.model.keyword,
|
||||
color: controller.model.color,
|
||||
hint: "请输入门店名称",
|
||||
onChange: (d) {
|
||||
controller.model.keyword = d;
|
||||
},
|
||||
findCallback: () {
|
||||
// controller.page = 0;
|
||||
// controller.getData();
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
));
|
||||
|
||||
Obx(() {
|
||||
if (controller.model.experienceStoreModelList.length ==
|
||||
0) {
|
||||
return CircularProgressIndicator(
|
||||
strokeWidth: 1,
|
||||
valueColor:
|
||||
AlwaysStoppedAnimation<Color>(Colors.white),
|
||||
);
|
||||
} else {
|
||||
return Container();
|
||||
}
|
||||
}),
|
||||
|
||||
Expanded(
|
||||
child: Obx(() => ListView(
|
||||
controller: scrollController,
|
||||
shrinkWrap: true,
|
||||
scrollDirection: Axis.vertical,
|
||||
children: List.generate(
|
||||
controller.model.experienceStoreModelList
|
||||
.length, (index) {
|
||||
return ExperienceStoreWidget(
|
||||
index: index,
|
||||
data: controller
|
||||
.model.experienceStoreModelList[index]);
|
||||
})
|
||||
.divide(const SizedBox(
|
||||
height: 25,
|
||||
))
|
||||
.addToStart(SizedBox(
|
||||
height: AppConstants.list_start_height,
|
||||
))
|
||||
.addToEnd(SizedBox(
|
||||
height: AppConstants.list_ano_end_height,
|
||||
))))),
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,315 +52,292 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
|
||||
});
|
||||
int login = userInfoController.model.login!;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// // onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: SafeArea(
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: (userInfoController.model.login! != null &&
|
||||
userInfoController.model.login! == 1)
|
||||
? MainAxisAlignment.start
|
||||
: MainAxisAlignment.center,
|
||||
children: [
|
||||
//未登录
|
||||
Obx(() {
|
||||
if (userInfoController.model.login! == null ||
|
||||
userInfoController.model.login! == 0) {
|
||||
return Center(
|
||||
child: InkWell(
|
||||
onTap: () => Get.toNamed("/loginPage"),
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
children: [
|
||||
WidgetSpan(
|
||||
child: Stack(
|
||||
children: [
|
||||
Text(
|
||||
"登录",
|
||||
style: TextStyle(
|
||||
color: stringToColor("#84F5FF"),
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 0, // 控制下划线与文字的间距
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: Container(
|
||||
height: 1, // 下划线粗细
|
||||
color: stringToColor("#84F5FF"),
|
||||
),
|
||||
),
|
||||
],
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: SafeArea(
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: (userInfoController.model.login! != null &&
|
||||
userInfoController.model.login! == 1)
|
||||
? MainAxisAlignment.start
|
||||
: MainAxisAlignment.center,
|
||||
children: [
|
||||
//未登录
|
||||
Obx(() {
|
||||
if (userInfoController.model.login! == null ||
|
||||
userInfoController.model.login! == 0) {
|
||||
return Center(
|
||||
child: InkWell(
|
||||
onTap: () => Get.toNamed("/loginPage"),
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
children: [
|
||||
WidgetSpan(
|
||||
child: Stack(
|
||||
children: [
|
||||
Text(
|
||||
"登录",
|
||||
style: TextStyle(
|
||||
color: stringToColor("#84F5FF"),
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: "查看睡眠报告",
|
||||
Positioned(
|
||||
bottom: 0, // 控制下划线与文字的间距
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: Container(
|
||||
height: 1, // 下划线粗细
|
||||
color: stringToColor("#84F5FF"),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: "查看睡眠报告",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
return Container();
|
||||
}),
|
||||
//已登录
|
||||
Obx(() {
|
||||
if (userInfoController.model.login! != null &&
|
||||
userInfoController.model.login! == 1) {
|
||||
final list = deviceController.personnelList.value;
|
||||
// if (list.isNotEmpty &&
|
||||
// formFieldController.value == null) {
|
||||
// WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
// formFieldController.value = list[0]["mac"];
|
||||
// personInfo.value = list[0];
|
||||
// homeController.selectPerson.value = list[0];
|
||||
// homeController.selectDevcie.value = list[0]["mac"];
|
||||
// deviceController
|
||||
// .getSleeps(formFieldController.value);
|
||||
// homeController.updateAll();
|
||||
// });
|
||||
// }
|
||||
if (list.isNotEmpty) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
formFieldController.value = list[0]["mac"];
|
||||
personInfo.value = list[0];
|
||||
homeController.selectPerson.value = list[0];
|
||||
homeController.selectDevcie.value = list[0]["mac"];
|
||||
deviceController.getSleeps(formFieldController.value);
|
||||
homeController.updateAll();
|
||||
});
|
||||
}
|
||||
//themeController.currentColor.sc5,
|
||||
if (homeController.personnelList.value.length != 0)
|
||||
return Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 40.rpx, 30.rpx, 10.rpx),
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 60.rpx,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(20.rpx),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
30.rpx, 16.rpx, 16.rpx, 25.rpx),
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'健康报告'.tr,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontFamily: 'Readex Pro',
|
||||
color: themeController.currentColor.sc3,
|
||||
letterSpacing: 0,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
ScrollbarTheme(
|
||||
data: ScrollbarThemeData(
|
||||
thumbColor: MaterialStateProperty.all(
|
||||
Colors.transparent),
|
||||
trackColor: MaterialStateProperty.all(
|
||||
Colors.transparent),
|
||||
trackBorderColor:
|
||||
MaterialStateProperty.all(
|
||||
Colors.transparent),
|
||||
),
|
||||
child: ValueListenableBuilder(
|
||||
valueListenable: formFieldController,
|
||||
builder: (c, a, s) => ClipRRect(
|
||||
borderRadius:
|
||||
BorderRadius.circular(36.rpx),
|
||||
child: Theme(
|
||||
data: Theme.of(context).copyWith(
|
||||
splashColor: Colors.transparent,
|
||||
highlightColor:
|
||||
Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
),
|
||||
child:
|
||||
FlutterFlowDropDown<String>(
|
||||
controller: formFieldController,
|
||||
options: deviceController
|
||||
.personnelList.value
|
||||
.map<String>(
|
||||
(d) => "${d["mac"]}")
|
||||
.toList(),
|
||||
optionLabels: deviceController
|
||||
.personnelList.value
|
||||
.map<String>((d) {
|
||||
var s = d["name"] ?? d["mac"];
|
||||
if (s == null) {
|
||||
return "";
|
||||
} else {
|
||||
return "$s";
|
||||
}
|
||||
}).toList(),
|
||||
onChanged: (val) {
|
||||
final list = deviceController
|
||||
.personnelList.value;
|
||||
final selectedPerson =
|
||||
list.firstWhere(
|
||||
(element) =>
|
||||
element['mac'] == val,
|
||||
orElse: () =>
|
||||
null, // 防止找不到时报错
|
||||
);
|
||||
homeController.selectPerson
|
||||
.value = selectedPerson;
|
||||
personInfo.value =
|
||||
selectedPerson;
|
||||
|
||||
homeController
|
||||
.selectedDayIndex =
|
||||
(6).obs;
|
||||
print("$val");
|
||||
if (val == null) {
|
||||
homeController
|
||||
.sleepDays.value = [];
|
||||
} else {
|
||||
homeController.selectDevcie
|
||||
.value =
|
||||
formFieldController
|
||||
.value!;
|
||||
deviceController.getSleeps(
|
||||
formFieldController
|
||||
.value);
|
||||
homeController.updateAll();
|
||||
}
|
||||
},
|
||||
width: 300.rpx,
|
||||
height: 81.rpx,
|
||||
maxHeight: 300.rpx,
|
||||
textStyle: TextStyle(
|
||||
fontSize: 28.rpx,
|
||||
overflow:
|
||||
TextOverflow.ellipsis,
|
||||
color: Colors.white,
|
||||
),
|
||||
hintText: '',
|
||||
icon: Icon(
|
||||
Icons
|
||||
.keyboard_arrow_down_rounded,
|
||||
color:
|
||||
stringToColor("#FFFFFF"),
|
||||
size: 30.rpx,
|
||||
),
|
||||
fillColor:
|
||||
stringToColor("#184468"),
|
||||
elevation: 2,
|
||||
borderColor: Colors.transparent,
|
||||
borderWidth: 2,
|
||||
borderRadius: 100.rpx,
|
||||
margin: EdgeInsetsDirectional
|
||||
.fromSTEB(32.rpx, 8.rpx,
|
||||
32.rpx, 8.rpx),
|
||||
hidesUnderline: true,
|
||||
isOverButton: false,
|
||||
isSearchable: false,
|
||||
isMultiSelect: false,
|
||||
),
|
||||
))),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
return Container();
|
||||
}),
|
||||
//已登录
|
||||
Obx(() {
|
||||
if (userInfoController.model.login! != null &&
|
||||
userInfoController.model.login! == 1) {
|
||||
final list = deviceController.personnelList.value;
|
||||
// if (list.isNotEmpty &&
|
||||
// formFieldController.value == null) {
|
||||
// WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
// formFieldController.value = list[0]["mac"];
|
||||
// personInfo.value = list[0];
|
||||
// homeController.selectPerson.value = list[0];
|
||||
// homeController.selectDevcie.value = list[0]["mac"];
|
||||
// deviceController
|
||||
// .getSleeps(formFieldController.value);
|
||||
// homeController.updateAll();
|
||||
// });
|
||||
// }
|
||||
if (list.isNotEmpty) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
formFieldController.value = list[0]["mac"];
|
||||
personInfo.value = list[0];
|
||||
homeController.selectPerson.value = list[0];
|
||||
homeController.selectDevcie.value = list[0]["mac"];
|
||||
deviceController
|
||||
.getSleeps(formFieldController.value);
|
||||
homeController.updateAll();
|
||||
});
|
||||
}
|
||||
//themeController.currentColor.sc5,
|
||||
if (homeController.personnelList.value.length != 0)
|
||||
return Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 40.rpx, 30.rpx, 10.rpx),
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 60.rpx,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(20.rpx),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
30.rpx, 16.rpx, 16.rpx, 25.rpx),
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'健康报告'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color:
|
||||
themeController.currentColor.sc3,
|
||||
letterSpacing: 0,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
ScrollbarTheme(
|
||||
data: ScrollbarThemeData(
|
||||
thumbColor: MaterialStateProperty.all(
|
||||
Colors.transparent),
|
||||
trackColor: MaterialStateProperty.all(
|
||||
Colors.transparent),
|
||||
trackBorderColor:
|
||||
MaterialStateProperty.all(
|
||||
Colors.transparent),
|
||||
),
|
||||
child: ValueListenableBuilder(
|
||||
valueListenable:
|
||||
formFieldController,
|
||||
builder: (c, a, s) => ClipRRect(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
36.rpx),
|
||||
child: Theme(
|
||||
data: Theme.of(context)
|
||||
.copyWith(
|
||||
splashColor:
|
||||
Colors.transparent,
|
||||
highlightColor:
|
||||
Colors.transparent,
|
||||
hoverColor:
|
||||
Colors.transparent,
|
||||
),
|
||||
child: FlutterFlowDropDown<
|
||||
String>(
|
||||
controller:
|
||||
formFieldController,
|
||||
options: deviceController
|
||||
.personnelList.value
|
||||
.map<String>((d) =>
|
||||
"${d["mac"]}")
|
||||
.toList(),
|
||||
optionLabels:
|
||||
deviceController
|
||||
.personnelList.value
|
||||
.map<String>((d) {
|
||||
var s =
|
||||
d["name"] ?? d["mac"];
|
||||
if (s == null) {
|
||||
return "";
|
||||
} else {
|
||||
return "$s";
|
||||
}
|
||||
}).toList(),
|
||||
onChanged: (val) {
|
||||
final list =
|
||||
deviceController
|
||||
.personnelList
|
||||
.value;
|
||||
final selectedPerson =
|
||||
list.firstWhere(
|
||||
(element) =>
|
||||
element['mac'] ==
|
||||
val,
|
||||
orElse: () =>
|
||||
null, // 防止找不到时报错
|
||||
);
|
||||
homeController
|
||||
.selectPerson
|
||||
.value =
|
||||
selectedPerson;
|
||||
personInfo.value =
|
||||
selectedPerson;
|
||||
),
|
||||
);
|
||||
}
|
||||
if (userInfoController.model.login != null &&
|
||||
userInfoController.model.login == 1)
|
||||
return Expanded(child: NullDataWidget());
|
||||
return Container();
|
||||
}),
|
||||
|
||||
homeController
|
||||
.selectedDayIndex =
|
||||
(6).obs;
|
||||
print("$val");
|
||||
if (val == null) {
|
||||
homeController.sleepDays
|
||||
.value = [];
|
||||
} else {
|
||||
homeController
|
||||
.selectDevcie
|
||||
.value =
|
||||
formFieldController
|
||||
.value!;
|
||||
deviceController.getSleeps(
|
||||
formFieldController
|
||||
.value);
|
||||
homeController
|
||||
.updateAll();
|
||||
}
|
||||
},
|
||||
width: 300.rpx,
|
||||
height: 81.rpx,
|
||||
maxHeight: 300.rpx,
|
||||
textStyle: TextStyle(
|
||||
fontSize: 28.rpx,
|
||||
overflow:
|
||||
TextOverflow.ellipsis,
|
||||
color: Colors.white,
|
||||
),
|
||||
hintText: '',
|
||||
icon: Icon(
|
||||
Icons
|
||||
.keyboard_arrow_down_rounded,
|
||||
color: stringToColor(
|
||||
"#FFFFFF"),
|
||||
size: 30.rpx,
|
||||
),
|
||||
fillColor: stringToColor(
|
||||
"#184468"),
|
||||
elevation: 2,
|
||||
borderColor:
|
||||
Colors.transparent,
|
||||
borderWidth: 2,
|
||||
borderRadius: 100.rpx,
|
||||
margin:
|
||||
EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
32.rpx,
|
||||
8.rpx,
|
||||
32.rpx,
|
||||
8.rpx),
|
||||
hidesUnderline: true,
|
||||
isOverButton: false,
|
||||
isSearchable: false,
|
||||
isMultiSelect: false,
|
||||
),
|
||||
))),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
if (userInfoController.model.login != null &&
|
||||
userInfoController.model.login == 1)
|
||||
return Expanded(child: NullDataWidget());
|
||||
return Container();
|
||||
}),
|
||||
Obx(() {
|
||||
if (homeController.selectDevcie.value != null &&
|
||||
homeController.selectDevcie.value!.isNotEmpty &&
|
||||
deviceController.personnelList.value.isNotEmpty)
|
||||
return Expanded(
|
||||
child: NewSleepReportPage(
|
||||
data: {
|
||||
"tag": "123",
|
||||
'date': DateTime.now().millisecondsSinceEpoch,
|
||||
'mac': homeController.selectDevcie.value,
|
||||
'person': homeController.selectPerson.value,
|
||||
'backgroundImg': 'assets/images/new_background.png',
|
||||
'arrow': false,
|
||||
'noBackImg': true,
|
||||
'person_show': false,
|
||||
},
|
||||
),
|
||||
);
|
||||
// }
|
||||
return Container();
|
||||
}),
|
||||
|
||||
Obx(() {
|
||||
if (homeController.selectDevcie.value != null &&
|
||||
homeController.selectDevcie.value!.isNotEmpty &&
|
||||
deviceController.personnelList.value.isNotEmpty)
|
||||
return Expanded(
|
||||
child: NewSleepReportPage(
|
||||
data: {
|
||||
"tag": "123",
|
||||
'date': DateTime.now().millisecondsSinceEpoch,
|
||||
'mac': homeController.selectDevcie.value,
|
||||
'person': homeController.selectPerson.value,
|
||||
'backgroundImg':
|
||||
'assets/images/new_background.png',
|
||||
'arrow': false,
|
||||
'noBackImg': true,
|
||||
'person_show': false,
|
||||
},
|
||||
),
|
||||
);
|
||||
// }
|
||||
return Container();
|
||||
}),
|
||||
|
||||
// Expanded(
|
||||
// child: NewSleepReportPage(
|
||||
// data: {
|
||||
// "tag": "123",
|
||||
// 'date': DateTime.now().millisecondsSinceEpoch,
|
||||
// 'mac': homeController.selectDevcie.value,
|
||||
// 'person': homeController.selectPerson.value,
|
||||
// 'backgroundImg': 'assets/images/new_background.png',
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// }
|
||||
],
|
||||
),
|
||||
),
|
||||
// Expanded(
|
||||
// child: NewSleepReportPage(
|
||||
// data: {
|
||||
// "tag": "123",
|
||||
// 'date': DateTime.now().millisecondsSinceEpoch,
|
||||
// 'mac': homeController.selectDevcie.value,
|
||||
// 'person': homeController.selectPerson.value,
|
||||
// 'backgroundImg': 'assets/images/new_background.png',
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// }
|
||||
],
|
||||
),
|
||||
),
|
||||
));
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class _MhtSleepReportReturnPageState extends State<MhtSleepReportReturnPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -32,171 +32,171 @@ class IssueListPage extends GetView<IssueListController> {
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
bodysize = cc;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'问题与帮助',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
// backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
body: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 1,
|
||||
decoration: BoxDecoration(
|
||||
// color: AppColors.bg_color,
|
||||
// color: Color(0xFFF6F6F6),
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'问题与帮助',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
child: Obx(() {
|
||||
if (controller.model.isLoading) {
|
||||
return Center(child: CircularProgressIndicator()); // ✅ 加载中
|
||||
}
|
||||
|
||||
if (controller.model.issueList.isEmpty) {
|
||||
return Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: 100,
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(31, 27, 0, 0),
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional(-1, 0),
|
||||
child: Text(
|
||||
'暂无内容!',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: AppFontsize.title_size,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// 有数据时渲染列表
|
||||
return ListView(
|
||||
children: controller.model.issueList!
|
||||
.asMap()
|
||||
.entries
|
||||
.map((e) => IssuePreviewWidget(
|
||||
index: e.key,
|
||||
issueListController: controller,
|
||||
))
|
||||
.toList(),
|
||||
);
|
||||
}),
|
||||
|
||||
// Obx(() {
|
||||
// return Visibility(
|
||||
// visible: controller.model.issueList != null &&
|
||||
// controller.model.issueList.isNotEmpty,
|
||||
// replacement: Container(
|
||||
// width: MediaQuery.sizeOf(context).width,
|
||||
// height: 100,
|
||||
// decoration: BoxDecoration(
|
||||
// color: FlutterFlowTheme.of(context).secondaryBackground,
|
||||
// ),
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(31, 27, 0, 0),
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Align(
|
||||
// alignment: AlignmentDirectional(-1, 0),
|
||||
// child: Text(
|
||||
// '暂无内容!',
|
||||
// style: FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// color: Color(0xFF9EA4B7),
|
||||
// fontSize: AppFontsize.title_size,
|
||||
// letterSpacing: 0,
|
||||
// fontWeight: FontWeight.w600,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// // TitleComponentWidget(
|
||||
// // titleName: '问题与帮助',
|
||||
// // ),
|
||||
// Flexible(
|
||||
// child: Padding(
|
||||
// padding:
|
||||
// EdgeInsetsDirectional.fromSTEB(15, 13, 15, 15),
|
||||
// child: Container(
|
||||
// width: bodysize!.maxWidth,
|
||||
// decoration: BoxDecoration(
|
||||
// // color: Colors.white,
|
||||
// // borderRadius: BorderRadius.circular(16),
|
||||
// ),
|
||||
// child: Obx(() => ListView(
|
||||
// padding: const EdgeInsets.fromLTRB(
|
||||
// 0,
|
||||
// 5,
|
||||
// 0,
|
||||
// 0,
|
||||
// ),
|
||||
// shrinkWrap: true,
|
||||
// scrollDirection: Axis.vertical,
|
||||
// children: (controller.model.issueList!
|
||||
// .asMap()
|
||||
// .entries
|
||||
// .map((e) => IssuePreviewWidget(
|
||||
// index: e.key,
|
||||
// issueListController: controller))
|
||||
// .toList() as List<Widget>))),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
));
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
// backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
body: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 1,
|
||||
decoration: BoxDecoration(
|
||||
// color: AppColors.bg_color,
|
||||
// color: Color(0xFFF6F6F6),
|
||||
),
|
||||
child: Obx(() {
|
||||
if (controller.model.isLoading) {
|
||||
return Center(child: CircularProgressIndicator()); // ✅ 加载中
|
||||
}
|
||||
|
||||
if (controller.model.issueList.isEmpty) {
|
||||
return Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: 100,
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(31, 27, 0, 0),
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional(-1, 0),
|
||||
child: Text(
|
||||
'暂无内容!',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: AppFontsize.title_size,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// 有数据时渲染列表
|
||||
return ListView(
|
||||
children: controller.model.issueList!
|
||||
.asMap()
|
||||
.entries
|
||||
.map((e) => IssuePreviewWidget(
|
||||
index: e.key,
|
||||
issueListController: controller,
|
||||
))
|
||||
.toList(),
|
||||
);
|
||||
}),
|
||||
|
||||
// Obx(() {
|
||||
// return Visibility(
|
||||
// visible: controller.model.issueList != null &&
|
||||
// controller.model.issueList.isNotEmpty,
|
||||
// replacement: Container(
|
||||
// width: MediaQuery.sizeOf(context).width,
|
||||
// height: 100,
|
||||
// decoration: BoxDecoration(
|
||||
// color: FlutterFlowTheme.of(context).secondaryBackground,
|
||||
// ),
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(31, 27, 0, 0),
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Align(
|
||||
// alignment: AlignmentDirectional(-1, 0),
|
||||
// child: Text(
|
||||
// '暂无内容!',
|
||||
// style: FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// color: Color(0xFF9EA4B7),
|
||||
// fontSize: AppFontsize.title_size,
|
||||
// letterSpacing: 0,
|
||||
// fontWeight: FontWeight.w600,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// // TitleComponentWidget(
|
||||
// // titleName: '问题与帮助',
|
||||
// // ),
|
||||
// Flexible(
|
||||
// child: Padding(
|
||||
// padding:
|
||||
// EdgeInsetsDirectional.fromSTEB(15, 13, 15, 15),
|
||||
// child: Container(
|
||||
// width: bodysize!.maxWidth,
|
||||
// decoration: BoxDecoration(
|
||||
// // color: Colors.white,
|
||||
// // borderRadius: BorderRadius.circular(16),
|
||||
// ),
|
||||
// child: Obx(() => ListView(
|
||||
// padding: const EdgeInsets.fromLTRB(
|
||||
// 0,
|
||||
// 5,
|
||||
// 0,
|
||||
// 0,
|
||||
// ),
|
||||
// shrinkWrap: true,
|
||||
// scrollDirection: Axis.vertical,
|
||||
// children: (controller.model.issueList!
|
||||
// .asMap()
|
||||
// .entries
|
||||
// .map((e) => IssuePreviewWidget(
|
||||
// index: e.key,
|
||||
// issueListController: controller))
|
||||
// .toList() as List<Widget>))),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
),
|
||||
),
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class _MessageDetailPageState extends State<MessageDetailPage> {
|
||||
var messageInfo = widget.data;
|
||||
return LayoutBuilder(
|
||||
builder: (context, boxConstraints) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
@@ -144,7 +144,7 @@ class _MessagePageState extends State<MessagePage> {
|
||||
|
||||
return LayoutBuilder(
|
||||
builder: (context, boxConstraints) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
@@ -261,7 +261,6 @@ class _MessagePageState extends State<MessagePage> {
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
Container bottomIcon(BuildContext context) {
|
||||
|
||||
@@ -50,103 +50,102 @@ class _MyExperiencePageState extends State<MyExperiencePage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
// key: scaffoldKey,
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
// leading: returnIconButtomAddCallback(() {
|
||||
// controller.saveDataApi();
|
||||
// updateParm(isShowToast: false);
|
||||
// }),
|
||||
// leading: returnIconButtomNew,
|
||||
title: Container(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'我的预约',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
// key: scaffoldKey,
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
// leading: returnIconButtomAddCallback(() {
|
||||
// controller.saveDataApi();
|
||||
// updateParm(isShowToast: false);
|
||||
// }),
|
||||
// leading: returnIconButtomNew,
|
||||
title: Container(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'我的预约',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
|
||||
body: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height * 1,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFF6F6F6),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
// TitleComponentWidget(
|
||||
// titleName: '我的预约',
|
||||
// ),
|
||||
Obx(() {
|
||||
if (controller.model.bookInfoList.length == 0) {
|
||||
return Empty();
|
||||
} else {
|
||||
return Container();
|
||||
}
|
||||
}),
|
||||
Expanded(
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height * 1,
|
||||
decoration: BoxDecoration(),
|
||||
child: Obx(() => ListView(
|
||||
controller: scrollController,
|
||||
shrinkWrap: true,
|
||||
scrollDirection: Axis.vertical,
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: AppConstants.list_start_height),
|
||||
...List.generate(
|
||||
controller.model.bookInfoList.length,
|
||||
(index) {
|
||||
return MyExperienceWidget(
|
||||
index: index,
|
||||
bookExperienceListController: controller);
|
||||
}),
|
||||
SizedBox(
|
||||
height: AppConstants.list_end_height,
|
||||
)
|
||||
],
|
||||
))),
|
||||
)
|
||||
],
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
));
|
||||
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
|
||||
body: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height * 1,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFF6F6F6),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
// TitleComponentWidget(
|
||||
// titleName: '我的预约',
|
||||
// ),
|
||||
Obx(() {
|
||||
if (controller.model.bookInfoList.length == 0) {
|
||||
return Empty();
|
||||
} else {
|
||||
return Container();
|
||||
}
|
||||
}),
|
||||
Expanded(
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height * 1,
|
||||
decoration: BoxDecoration(),
|
||||
child: Obx(() => ListView(
|
||||
controller: scrollController,
|
||||
shrinkWrap: true,
|
||||
scrollDirection: Axis.vertical,
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: AppConstants.list_start_height),
|
||||
...List.generate(
|
||||
controller.model.bookInfoList.length, (index) {
|
||||
return MyExperienceWidget(
|
||||
index: index,
|
||||
bookExperienceListController: controller);
|
||||
}),
|
||||
SizedBox(
|
||||
height: AppConstants.list_end_height,
|
||||
)
|
||||
],
|
||||
))),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ class _MinePageState extends State<NewMinePage> {
|
||||
int login = userInfoController.model.login!;
|
||||
return LayoutBuilder(
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
@@ -31,7 +31,7 @@ class _SettingPageState extends State<SettingPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(builder: (context, bodySize) {
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
@@ -37,7 +37,7 @@ class _PrivacyPolicyPageState extends State<PrivacyPolicyPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
@@ -71,6 +71,7 @@ class _PrivacyPolicyPageState extends State<PrivacyPolicyPage> {
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
|
||||
/// 左边返回按钮
|
||||
Positioned(
|
||||
left: 0,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -39,231 +39,221 @@ class DeviceRepairPage extends GetView<RepairListController> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
bodysize = cc;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
// key: scaffoldKey,
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
automaticallyImplyLeading: false,
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'设备报修',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
// key: scaffoldKey,
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
automaticallyImplyLeading: false,
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'设备报修',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
centerTitle: false,
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(30.rpx, 6.rpx, 30.rpx, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
// 报修须知
|
||||
Container(
|
||||
height: 412.rpx,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: Color(0XFFC8CBD2), width: 0.rpx),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
27.rpx, 49.rpx, 43.rpx, 39.rpx),
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
// 固定的标题部分
|
||||
Text(
|
||||
"报修须知",
|
||||
style: TextStyle(
|
||||
fontSize: 30.rpx,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
SizedBox(height: 33.rpx),
|
||||
// 可滚动的正文部分,限定高度
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
color: Color(0XFF929699),
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
"尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧棉花糖APP保修页面直接报修或拨打 ",
|
||||
style: TextStyle(
|
||||
color:
|
||||
Color(0XFF929699),
|
||||
fontSize: 26.rpx,
|
||||
height: 1.3)),
|
||||
TextSpan(
|
||||
text: "400-8756-966",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
// height: 1.3,
|
||||
decoration: TextDecoration
|
||||
.underline, // 添加下划线
|
||||
decorationColor:
|
||||
Colors.white,
|
||||
decorationThickness: 4.rpx,
|
||||
),
|
||||
recognizer:
|
||||
TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
MyUtils.makePhoneCall(
|
||||
"400-8756-966");
|
||||
},
|
||||
),
|
||||
TextSpan(
|
||||
text: " 反馈。",
|
||||
style: TextStyle(
|
||||
color:
|
||||
Color(0XFF929699),
|
||||
fontSize: 26.rpx,
|
||||
height: 1.3)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
))),
|
||||
SizedBox(height: 24.rpx),
|
||||
InkWell(
|
||||
onTap: () {},
|
||||
child: CustomCard(
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {
|
||||
Get.toNamed("/applyRepairPage");
|
||||
},
|
||||
colors: const [
|
||||
Color(0xFFFCFCFC),
|
||||
Color(0xFFF8FAF9),
|
||||
Color(0XFFECF6F3),
|
||||
Color(0XFFD9F0E9),
|
||||
Color(0xFFCEECE3)
|
||||
],
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: Text(
|
||||
"我要报修",
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(30.rpx, 6.rpx, 30.rpx, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
// 报修须知
|
||||
Container(
|
||||
height: 412.rpx,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: Color(0XFFC8CBD2), width: 0.rpx),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
27.rpx, 49.rpx, 43.rpx, 39.rpx),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
// 固定的标题部分
|
||||
Text(
|
||||
"报修须知",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: stringToColor("#011D33"),
|
||||
letterSpacing: 0,
|
||||
fontSize: 30.rpx,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
SizedBox(height: 33.rpx),
|
||||
// 可滚动的正文部分,限定高度
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
color: Color(0XFF929699),
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
"尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧棉花糖APP保修页面直接报修或拨打 ",
|
||||
style: TextStyle(
|
||||
color: Color(0XFF929699),
|
||||
fontSize: 26.rpx,
|
||||
height: 1.3)),
|
||||
TextSpan(
|
||||
text: "400-8756-966",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
// height: 1.3,
|
||||
decoration: TextDecoration
|
||||
.underline, // 添加下划线
|
||||
decorationColor: Colors.white,
|
||||
decorationThickness: 4.rpx,
|
||||
),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
MyUtils.makePhoneCall(
|
||||
"400-8756-966");
|
||||
},
|
||||
),
|
||||
TextSpan(
|
||||
text: " 反馈。",
|
||||
style: TextStyle(
|
||||
color: Color(0XFF929699),
|
||||
fontSize: 26.rpx,
|
||||
height: 1.3)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
SizedBox(height: 235.rpx),
|
||||
// 报修历史标题
|
||||
Container(
|
||||
width: double.infinity,
|
||||
child: Text("报修历史",
|
||||
],
|
||||
))),
|
||||
SizedBox(height: 24.rpx),
|
||||
InkWell(
|
||||
onTap: () {},
|
||||
child: CustomCard(
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {
|
||||
Get.toNamed("/applyRepairPage");
|
||||
},
|
||||
colors: const [
|
||||
Color(0xFFFCFCFC),
|
||||
Color(0xFFF8FAF9),
|
||||
Color(0XFFECF6F3),
|
||||
Color(0XFFD9F0E9),
|
||||
Color(0xFFCEECE3)
|
||||
],
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: Text(
|
||||
"我要报修",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
height: 1)),
|
||||
),
|
||||
SizedBox(height: 32.rpx),
|
||||
// Obx(() {
|
||||
// return Visibility(
|
||||
// visible: controller.model.repairList != null &&
|
||||
// controller.model.repairList!.isNotEmpty,
|
||||
// replacement: EmptyMessageWidget(),
|
||||
// child: Expanded(
|
||||
// child: Obx(() => ListView(
|
||||
// controller:
|
||||
// scrollController, // 绑定 ScrollController
|
||||
// shrinkWrap: true,
|
||||
// scrollDirection: Axis.vertical,
|
||||
// children: (controller.model.repairList
|
||||
// .asMap()
|
||||
// .entries
|
||||
// .map((e) => RepairHistoryWidget(
|
||||
// index: e.key,
|
||||
// repairListController: controller))
|
||||
// .toList() as List<Widget>))),
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
// 替换原来的 Obx(() => Visibility(...))
|
||||
Expanded(
|
||||
child: Obx(() {
|
||||
final hasData =
|
||||
controller.model.repairList != null &&
|
||||
controller.model.repairList!.isNotEmpty;
|
||||
return hasData
|
||||
? ListView(
|
||||
controller: scrollController,
|
||||
padding: EdgeInsets.zero,
|
||||
shrinkWrap: true,
|
||||
children: controller.model.repairList
|
||||
.asMap()
|
||||
.entries
|
||||
.map((e) => RepairHistoryWidget(
|
||||
index: e.key,
|
||||
repairListController:
|
||||
controller,
|
||||
))
|
||||
.toList(),
|
||||
)
|
||||
: NullDataWidget();
|
||||
}),
|
||||
),
|
||||
],
|
||||
fontFamily: 'Readex Pro',
|
||||
color: stringToColor("#011D33"),
|
||||
letterSpacing: 0,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
SizedBox(height: 235.rpx),
|
||||
// 报修历史标题
|
||||
Container(
|
||||
width: double.infinity,
|
||||
child: Text("报修历史",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
height: 1)),
|
||||
),
|
||||
))),
|
||||
));
|
||||
SizedBox(height: 32.rpx),
|
||||
// Obx(() {
|
||||
// return Visibility(
|
||||
// visible: controller.model.repairList != null &&
|
||||
// controller.model.repairList!.isNotEmpty,
|
||||
// replacement: EmptyMessageWidget(),
|
||||
// child: Expanded(
|
||||
// child: Obx(() => ListView(
|
||||
// controller:
|
||||
// scrollController, // 绑定 ScrollController
|
||||
// shrinkWrap: true,
|
||||
// scrollDirection: Axis.vertical,
|
||||
// children: (controller.model.repairList
|
||||
// .asMap()
|
||||
// .entries
|
||||
// .map((e) => RepairHistoryWidget(
|
||||
// index: e.key,
|
||||
// repairListController: controller))
|
||||
// .toList() as List<Widget>))),
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
// 替换原来的 Obx(() => Visibility(...))
|
||||
Expanded(
|
||||
child: Obx(() {
|
||||
final hasData = controller.model.repairList != null &&
|
||||
controller.model.repairList!.isNotEmpty;
|
||||
return hasData
|
||||
? ListView(
|
||||
controller: scrollController,
|
||||
padding: EdgeInsets.zero,
|
||||
shrinkWrap: true,
|
||||
children: controller.model.repairList
|
||||
.asMap()
|
||||
.entries
|
||||
.map((e) => RepairHistoryWidget(
|
||||
index: e.key,
|
||||
repairListController: controller,
|
||||
))
|
||||
.toList(),
|
||||
)
|
||||
: NullDataWidget();
|
||||
}),
|
||||
),
|
||||
],
|
||||
),
|
||||
))),
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class _RoomPickerPageState extends State<RoomPickerPage> {
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
bodysize = cc;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/score_controller.dart' as mh;
|
||||
|
||||
class ScorePage extends GetView<mh.ScoreController> {
|
||||
BoxConstraints? bodysize;
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
@@ -18,432 +19,412 @@ class ScorePage extends GetView<mh.ScoreController> {
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
bodysize = cc;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
// key: scaffoldKey,
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
automaticallyImplyLeading: false,
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'评价'.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
// key: scaffoldKey,
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
automaticallyImplyLeading: false,
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'评价'.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
|
||||
body: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 1,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
// TitleComponentWidget(
|
||||
// titleName: '评价',
|
||||
// ),
|
||||
Expanded(
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
body: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 1,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
// TitleComponentWidget(
|
||||
// titleName: '评价',
|
||||
// ),
|
||||
Expanded(
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
30.rpx, 26.rpx, 30.rpx, 0),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 346,
|
||||
minHeight: 115,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF003058),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
30.rpx, 26.rpx, 30.rpx, 0),
|
||||
22, 27, 17, 22),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 346,
|
||||
minHeight: 115,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF003058),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
22, 27, 17, 22),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF003058),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0, 0),
|
||||
child: Text(
|
||||
'我要评价'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
color: Colors.white),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(0, 0),
|
||||
child: Text(
|
||||
'我要评价'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
color: Colors.white),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
controller.model.score = 1;
|
||||
controller.updateAll();
|
||||
},
|
||||
child: Obx(() {
|
||||
return Icon(
|
||||
Icons.star,
|
||||
color: controller
|
||||
.model.score! >=
|
||||
1
|
||||
? stringToColor("#F8AE00")
|
||||
: stringToColor("#D0D0D0"),
|
||||
size: 40,
|
||||
);
|
||||
}),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
controller.model.score = 1;
|
||||
controller.updateAll();
|
||||
},
|
||||
child: Obx(() {
|
||||
return Icon(
|
||||
Icons.star,
|
||||
color: controller
|
||||
.model.score! >=
|
||||
1
|
||||
? stringToColor(
|
||||
"#F8AE00")
|
||||
: stringToColor(
|
||||
"#D0D0D0"),
|
||||
size: 40,
|
||||
);
|
||||
}),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
controller.model.score = 2;
|
||||
controller.updateAll();
|
||||
},
|
||||
child: Obx(() {
|
||||
return Icon(
|
||||
Icons.star,
|
||||
color: controller
|
||||
.model.score! >=
|
||||
2
|
||||
? stringToColor(
|
||||
"#F8AE00")
|
||||
: stringToColor(
|
||||
"#D0D0D0"),
|
||||
size: 40,
|
||||
);
|
||||
}),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
controller.model.score = 3;
|
||||
controller.updateAll();
|
||||
},
|
||||
child: Obx(() {
|
||||
return Icon(
|
||||
Icons.star,
|
||||
color: controller
|
||||
.model.score! >=
|
||||
3
|
||||
? stringToColor(
|
||||
"#F8AE00")
|
||||
: stringToColor(
|
||||
"#D0D0D0"),
|
||||
size: 40,
|
||||
);
|
||||
}),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
controller.model.score = 4;
|
||||
controller.updateAll();
|
||||
},
|
||||
child: Obx(() {
|
||||
return Icon(
|
||||
Icons.star,
|
||||
color: controller
|
||||
.model.score! >=
|
||||
4
|
||||
? stringToColor(
|
||||
"#F8AE00")
|
||||
: stringToColor(
|
||||
"#D0D0D0"),
|
||||
size: 40,
|
||||
);
|
||||
}),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
controller.model.score = 5;
|
||||
controller.updateAll();
|
||||
},
|
||||
child: Obx(() {
|
||||
return Icon(
|
||||
Icons.star,
|
||||
color: controller
|
||||
.model.score! >=
|
||||
5
|
||||
? stringToColor(
|
||||
"#F8AE00")
|
||||
: stringToColor(
|
||||
"#D0D0D0"),
|
||||
size: 40,
|
||||
);
|
||||
}),
|
||||
),
|
||||
].divide(SizedBox(width: 10)),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
controller.model.score = 2;
|
||||
controller.updateAll();
|
||||
},
|
||||
child: Obx(() {
|
||||
return Icon(
|
||||
Icons.star,
|
||||
color: controller
|
||||
.model.score! >=
|
||||
2
|
||||
? stringToColor("#F8AE00")
|
||||
: stringToColor("#D0D0D0"),
|
||||
size: 40,
|
||||
);
|
||||
}),
|
||||
),
|
||||
].divide(SizedBox(height: 26)),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
controller.model.score = 3;
|
||||
controller.updateAll();
|
||||
},
|
||||
child: Obx(() {
|
||||
return Icon(
|
||||
Icons.star,
|
||||
color: controller
|
||||
.model.score! >=
|
||||
3
|
||||
? stringToColor("#F8AE00")
|
||||
: stringToColor("#D0D0D0"),
|
||||
size: 40,
|
||||
);
|
||||
}),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
controller.model.score = 4;
|
||||
controller.updateAll();
|
||||
},
|
||||
child: Obx(() {
|
||||
return Icon(
|
||||
Icons.star,
|
||||
color: controller
|
||||
.model.score! >=
|
||||
4
|
||||
? stringToColor("#F8AE00")
|
||||
: stringToColor("#D0D0D0"),
|
||||
size: 40,
|
||||
);
|
||||
}),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
controller.model.score = 5;
|
||||
controller.updateAll();
|
||||
},
|
||||
child: Obx(() {
|
||||
return Icon(
|
||||
Icons.star,
|
||||
color: controller
|
||||
.model.score! >=
|
||||
5
|
||||
? stringToColor("#F8AE00")
|
||||
: stringToColor("#D0D0D0"),
|
||||
size: 40,
|
||||
);
|
||||
}),
|
||||
),
|
||||
].divide(SizedBox(width: 10)),
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(height: 26)),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
30.rpx, 30.rpx, 30.rpx, 0),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 346,
|
||||
minHeight: 152,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF003058),
|
||||
borderRadius: BorderRadius.circular(16.rpx),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
30.rpx, 30.rpx, 30.rpx, 0),
|
||||
14, 14, 14, 21),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 346,
|
||||
minHeight: 152,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF003058),
|
||||
borderRadius: BorderRadius.circular(16.rpx),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14, 14, 14, 21),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF003058),
|
||||
borderRadius:
|
||||
BorderRadius.circular(16.rpx),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0, 0),
|
||||
child: Obx(() {
|
||||
String scoreText;
|
||||
Color scoreColor;
|
||||
if (controller.model.score == 1) {
|
||||
scoreText = '差';
|
||||
scoreColor =
|
||||
stringToColor("#E55E92");
|
||||
} else if (controller.model.score ==
|
||||
2) {
|
||||
scoreText = '较差';
|
||||
scoreColor =
|
||||
stringToColor("#E55E92");
|
||||
} else if (controller.model.score ==
|
||||
3) {
|
||||
scoreText = '一般';
|
||||
scoreColor =
|
||||
stringToColor("#07C160");
|
||||
} else if (controller.model.score ==
|
||||
4) {
|
||||
scoreText = '优秀';
|
||||
scoreColor =
|
||||
stringToColor("#F8AE00");
|
||||
} else if (controller.model.score ==
|
||||
5) {
|
||||
scoreText = '完美';
|
||||
scoreColor =
|
||||
stringToColor("#F8AE00");
|
||||
} else {
|
||||
scoreText = '未评分'; // 如果没有评分显示默认文字
|
||||
scoreColor = Colors.grey; // 默认颜色
|
||||
}
|
||||
return Text(
|
||||
scoreText,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
color: scoreColor,
|
||||
fontWeight: FontWeight.bold),
|
||||
);
|
||||
}),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(0, 0),
|
||||
child: Obx(() {
|
||||
String scoreText;
|
||||
Color scoreColor;
|
||||
if (controller.model.score == 1) {
|
||||
scoreText = '差';
|
||||
scoreColor =
|
||||
stringToColor("#E55E92");
|
||||
} else if (controller
|
||||
.model.score ==
|
||||
2) {
|
||||
scoreText = '较差';
|
||||
scoreColor =
|
||||
stringToColor("#E55E92");
|
||||
} else if (controller
|
||||
.model.score ==
|
||||
3) {
|
||||
scoreText = '一般';
|
||||
scoreColor =
|
||||
stringToColor("#07C160");
|
||||
} else if (controller
|
||||
.model.score ==
|
||||
4) {
|
||||
scoreText = '优秀';
|
||||
scoreColor =
|
||||
stringToColor("#F8AE00");
|
||||
} else if (controller
|
||||
.model.score ==
|
||||
5) {
|
||||
scoreText = '完美';
|
||||
scoreColor =
|
||||
stringToColor("#F8AE00");
|
||||
} else {
|
||||
scoreText =
|
||||
'未评分'; // 如果没有评分显示默认文字
|
||||
scoreColor =
|
||||
Colors.grey; // 默认颜色
|
||||
}
|
||||
return Text(
|
||||
scoreText,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
color: scoreColor,
|
||||
fontWeight:
|
||||
FontWeight.bold),
|
||||
);
|
||||
}),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(-1, 0),
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(
|
||||
0, 17, 0, 0),
|
||||
child: Text(
|
||||
'再多的溢美之词,都比不上您真心的评价。我们愿付出200%的努力,只为您100%的满意~感谢您的支持与厚爱!',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
color: Color(0xFF9AA0B3)),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(-1, 0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional
|
||||
.fromSTEB(0, 17, 0, 0),
|
||||
child: Text(
|
||||
'再多的溢美之词,都比不上您真心的评价。我们愿付出200%的努力,只为您100%的满意~感谢您的支持与厚爱!',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
color: Color(0xFF9AA0B3)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
15, 0, 15, AppConstants.page_button_bottom_padding),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 0.056,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
15, 0, 15, AppConstants.page_button_bottom_padding),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 0.056,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16.rpx),
|
||||
),
|
||||
// child: Container(
|
||||
// width: bodysize!.maxWidth,
|
||||
// height: bodysize!.maxHeight * 0.056,
|
||||
// decoration: BoxDecoration(
|
||||
// color: FlutterFlowTheme.of(context)
|
||||
// .secondaryBackground,
|
||||
// borderRadius: BorderRadius.circular(12),
|
||||
// ),
|
||||
// child: FFButtonWidget(
|
||||
// onPressed: () {
|
||||
// // RepairListController repairListController =
|
||||
// // Get.find();
|
||||
// // RepairInfoController repairInfoController =
|
||||
// // Get.find();
|
||||
// // repairListController
|
||||
// // .addScore(
|
||||
// // repairInfoController
|
||||
// // .model.applyRepairModel!.id!,
|
||||
// // controller.model.score!)
|
||||
// // .then((String msg) {
|
||||
// // if (msg != null && msg.isNotEmpty) {
|
||||
// // MyDialogController myDialogController =
|
||||
// // Get.find();
|
||||
// // showToast("评价失败,请稍后再试");
|
||||
// // } else {
|
||||
// // MyDialogController myDialogController =
|
||||
// // Get.find();
|
||||
// // myDialogController
|
||||
// // .showCustomDialog(context, "评价成功",
|
||||
// // textColor: stringToColor("#71E2A3"))
|
||||
// // .then((_) {
|
||||
// // // 弹窗关闭后执行的代码
|
||||
// // // Get.toNamed("/userInfoPage");
|
||||
// // repairInfoController.model.applyRepairModel!
|
||||
// // .score = controller.model.score!;
|
||||
// // repairInfoController.updateAll();
|
||||
// // Get.back();
|
||||
// // }).catchError((error) {
|
||||
// // // 处理弹窗显示错误的逻辑
|
||||
// // print("弹窗显示失败: $error");
|
||||
// // });
|
||||
// // }
|
||||
// // });
|
||||
// },
|
||||
// text: '确定',
|
||||
// options: FFButtonOptions(
|
||||
// height: 40,
|
||||
// padding:
|
||||
// EdgeInsetsDirectional.fromSTEB(24, 0, 24, 0),
|
||||
// iconPadding:
|
||||
// EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0),
|
||||
// color: Color(0xFFD3B684),
|
||||
// textStyle: FlutterFlowTheme.of(context)
|
||||
// .titleSmall
|
||||
// .override(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// color: Colors.white,
|
||||
// fontSize: 13,
|
||||
// letterSpacing: 0,
|
||||
// ),
|
||||
// elevation: 0,
|
||||
// borderSide: BorderSide(
|
||||
// color: Colors.transparent,
|
||||
// width: 1,
|
||||
// ),
|
||||
// borderRadius: BorderRadius.circular(8),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
child: CustomCard(
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {
|
||||
Get.toNamed("/applyRepairPage");
|
||||
},
|
||||
colors: const [
|
||||
Color(0xFFFCFCFC),
|
||||
Color(0xFFF8FAF9),
|
||||
Color(0XFFECF6F3),
|
||||
Color(0XFFD9F0E9),
|
||||
Color(0xFFCEECE3)
|
||||
],
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16.rpx),
|
||||
),
|
||||
// child: Container(
|
||||
// width: bodysize!.maxWidth,
|
||||
// height: bodysize!.maxHeight * 0.056,
|
||||
// decoration: BoxDecoration(
|
||||
// color: FlutterFlowTheme.of(context)
|
||||
// .secondaryBackground,
|
||||
// borderRadius: BorderRadius.circular(12),
|
||||
// ),
|
||||
// child: FFButtonWidget(
|
||||
// onPressed: () {
|
||||
// // RepairListController repairListController =
|
||||
// // Get.find();
|
||||
// // RepairInfoController repairInfoController =
|
||||
// // Get.find();
|
||||
// // repairListController
|
||||
// // .addScore(
|
||||
// // repairInfoController
|
||||
// // .model.applyRepairModel!.id!,
|
||||
// // controller.model.score!)
|
||||
// // .then((String msg) {
|
||||
// // if (msg != null && msg.isNotEmpty) {
|
||||
// // MyDialogController myDialogController =
|
||||
// // Get.find();
|
||||
// // showToast("评价失败,请稍后再试");
|
||||
// // } else {
|
||||
// // MyDialogController myDialogController =
|
||||
// // Get.find();
|
||||
// // myDialogController
|
||||
// // .showCustomDialog(context, "评价成功",
|
||||
// // textColor: stringToColor("#71E2A3"))
|
||||
// // .then((_) {
|
||||
// // // 弹窗关闭后执行的代码
|
||||
// // // Get.toNamed("/userInfoPage");
|
||||
// // repairInfoController.model.applyRepairModel!
|
||||
// // .score = controller.model.score!;
|
||||
// // repairInfoController.updateAll();
|
||||
// // Get.back();
|
||||
// // }).catchError((error) {
|
||||
// // // 处理弹窗显示错误的逻辑
|
||||
// // print("弹窗显示失败: $error");
|
||||
// // });
|
||||
// // }
|
||||
// // });
|
||||
// },
|
||||
// text: '确定',
|
||||
// options: FFButtonOptions(
|
||||
// height: 40,
|
||||
// padding:
|
||||
// EdgeInsetsDirectional.fromSTEB(24, 0, 24, 0),
|
||||
// iconPadding:
|
||||
// EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0),
|
||||
// color: Color(0xFFD3B684),
|
||||
// textStyle: FlutterFlowTheme.of(context)
|
||||
// .titleSmall
|
||||
// .override(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// color: Colors.white,
|
||||
// fontSize: 13,
|
||||
// letterSpacing: 0,
|
||||
// ),
|
||||
// elevation: 0,
|
||||
// borderSide: BorderSide(
|
||||
// color: Colors.transparent,
|
||||
// width: 1,
|
||||
// ),
|
||||
// borderRadius: BorderRadius.circular(8),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
child: CustomCard(
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {
|
||||
Get.toNamed("/applyRepairPage");
|
||||
},
|
||||
colors: const [
|
||||
Color(0xFFFCFCFC),
|
||||
Color(0xFFF8FAF9),
|
||||
Color(0XFFECF6F3),
|
||||
Color(0XFFD9F0E9),
|
||||
Color(0xFFCEECE3)
|
||||
],
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16.rpx),
|
||||
),
|
||||
child: Text(
|
||||
"提交",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: stringToColor("#011D33"),
|
||||
letterSpacing: 0,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
"提交",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: stringToColor("#011D33"),
|
||||
letterSpacing: 0,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
));
|
||||
),
|
||||
),
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class _SleepHabitPageState extends State<SleepHabitPage> {
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
bodysize = cc;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
@@ -38,299 +38,294 @@ class Smys extends GetView<SleepingHabitController> {
|
||||
|
||||
return LayoutBuilder(
|
||||
builder: (context, boxConstraints) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
// leading: returnIconButtomAddCallback(() {
|
||||
// controller.saveDataApi();
|
||||
// updateParm(isShowToast: false);
|
||||
// }),
|
||||
// leading: returnIconButtomNew,
|
||||
title: Container(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'睡眠隐私'.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
// leading: returnIconButtomAddCallback(() {
|
||||
// controller.saveDataApi();
|
||||
// updateParm(isShowToast: false);
|
||||
// }),
|
||||
// leading: returnIconButtomNew,
|
||||
title: Container(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Obx(
|
||||
() => Container(
|
||||
padding: EdgeInsets.only(left: 30.rpx, right: 30.rpx),
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height * 1.123,
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.transparent,
|
||||
// image: DecorationImage(
|
||||
// image: AssetImage("assets/images/background.png"),
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// ),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'睡眠隐私'.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Obx(
|
||||
() => Container(
|
||||
padding: EdgeInsets.only(left: 30.rpx, right: 30.rpx),
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height * 1.123,
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.transparent,
|
||||
// image: DecorationImage(
|
||||
// image: AssetImage("assets/images/background.png"),
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// ),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.sizeOf(context).height * 0.055,
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: const Color(0xFF929699),
|
||||
width: 0.rpx),
|
||||
),
|
||||
),
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 90.rpx, // 设置最小高度
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
39.rpx, 0.rpx, 15.rpx, 0.rpx),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'睡眠隐私功能'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
|
||||
// height:
|
||||
// MediaQuery.sizeOf(context).height *
|
||||
// 0.04,
|
||||
child: FlutterSwitch(
|
||||
width: 70.rpx,
|
||||
height: 36.rpx,
|
||||
toggleSize: 30.rpx,
|
||||
activeColor: Color(0XFF6BFDAC),
|
||||
inactiveColor: Color(0XFF003058),
|
||||
toggleColor: Color(0xFF011D33),
|
||||
value: controller.model.smysIsStart,
|
||||
onToggle: (val) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.smysIsStart = val;
|
||||
});
|
||||
},
|
||||
)),
|
||||
],
|
||||
),
|
||||
)),
|
||||
// getLine(),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
showDayTimeSelectionDialog(context,
|
||||
dayTimeArr: controller.model.smysStartTime,
|
||||
title: "开始时间".tr, checkChange: (d) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.smysStartTime = [
|
||||
int.parse("${d[0]}"),
|
||||
int.parse("${d[1]}")
|
||||
];
|
||||
});
|
||||
// updateParm();
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height:
|
||||
MediaQuery.sizeOf(context).height * 0.055,
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Color(0xFF929699),
|
||||
// color: Colors.red,
|
||||
width: 0.rpx),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.sizeOf(context).height * 0.055,
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: const Color(0xFF929699), width: 0.rpx),
|
||||
),
|
||||
),
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 90.rpx, // 设置最小高度
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
39.rpx, 0.rpx, 15.rpx, 0.rpx),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'睡眠隐私功能'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 90.rpx, // 设置最小高度
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
39.rpx, 0.rpx, 30.rpx, 0.rpx),
|
||||
child: Row(
|
||||
Container(
|
||||
|
||||
// height:
|
||||
// MediaQuery.sizeOf(context).height *
|
||||
// 0.04,
|
||||
child: FlutterSwitch(
|
||||
width: 70.rpx,
|
||||
height: 36.rpx,
|
||||
toggleSize: 30.rpx,
|
||||
activeColor: Color(0XFF6BFDAC),
|
||||
inactiveColor: Color(0XFF003058),
|
||||
toggleColor: Color(0xFF011D33),
|
||||
value: controller.model.smysIsStart,
|
||||
onToggle: (val) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.smysIsStart = val;
|
||||
});
|
||||
},
|
||||
)),
|
||||
],
|
||||
),
|
||||
)),
|
||||
// getLine(),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
showDayTimeSelectionDialog(context,
|
||||
dayTimeArr: controller.model.smysStartTime,
|
||||
title: "开始时间".tr, checkChange: (d) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.smysStartTime = [
|
||||
int.parse("${d[0]}"),
|
||||
int.parse("${d[1]}")
|
||||
];
|
||||
});
|
||||
// updateParm();
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.sizeOf(context).height * 0.055,
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Color(0xFF929699),
|
||||
// color: Colors.red,
|
||||
width: 0.rpx),
|
||||
),
|
||||
),
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 90.rpx, // 设置最小高度
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
39.rpx, 0.rpx, 30.rpx, 0.rpx),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'开始时间'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'开始时间'.tr,
|
||||
"${controller.model.smysStartTimeToString}",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
"${controller.model.smysStartTimeToString}",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 16.rpx,
|
||||
),
|
||||
Container(
|
||||
height: 30.rpx,
|
||||
width: 30.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/expand_more.svg',
|
||||
color: Colors.white,
|
||||
))
|
||||
],
|
||||
SizedBox(
|
||||
width: 16.rpx,
|
||||
),
|
||||
Container(
|
||||
height: 30.rpx,
|
||||
width: 30.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/expand_more.svg',
|
||||
color: Colors.white,
|
||||
))
|
||||
],
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
)),
|
||||
),
|
||||
// getLine(),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
showDayTimeSelectionDialog(context,
|
||||
dayTimeArr: controller.model.smysEndTime,
|
||||
title: "结束时间".tr, checkChange: (d) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.smysEndTime = [
|
||||
int.parse("${d[0]}"),
|
||||
int.parse("${d[1]}")
|
||||
];
|
||||
});
|
||||
// updateParm();
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.sizeOf(context).height * 0.055,
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: const Color(0xFF929699), width: 0.rpx),
|
||||
),
|
||||
),
|
||||
// getLine(),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
showDayTimeSelectionDialog(context,
|
||||
dayTimeArr: controller.model.smysEndTime,
|
||||
title: "结束时间".tr, checkChange: (d) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.smysEndTime = [
|
||||
int.parse("${d[0]}"),
|
||||
int.parse("${d[1]}")
|
||||
];
|
||||
});
|
||||
// updateParm();
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.sizeOf(context).height * 0.055,
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: const Color(0xFF929699),
|
||||
width: 0.rpx),
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 90.rpx, // 设置最小高度
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
39.rpx, 0.rpx, 30.rpx, 0.rpx),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'结束时间'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 90.rpx, // 设置最小高度
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
39.rpx, 0.rpx, 30.rpx, 0.rpx),
|
||||
child: Row(
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'结束时间'.tr,
|
||||
"${controller.model.smysEndTimeToString}",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
"${controller.model.smysEndTimeToString}",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 16.rpx,
|
||||
),
|
||||
Container(
|
||||
height: 30.rpx,
|
||||
width: 30.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/expand_more.svg',
|
||||
color: Colors.white,
|
||||
))
|
||||
],
|
||||
SizedBox(
|
||||
width: 16.rpx,
|
||||
),
|
||||
Container(
|
||||
height: 30.rpx,
|
||||
width: 30.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/expand_more.svg',
|
||||
color: Colors.white,
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
), // getLine(),
|
||||
SizedBox(
|
||||
height: 30.rpx,
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 25.rpx),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(),
|
||||
child: Text(
|
||||
'*注:开启睡眠隐私功能后,在设置的时间段内,将不会采集您的睡眠数据。'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
), // getLine(),
|
||||
SizedBox(
|
||||
height: 30.rpx,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 25.rpx),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(),
|
||||
child: Text(
|
||||
'*注:开启睡眠隐私功能后,在设置的时间段内,将不会采集您的睡眠数据。'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
),
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class _UpdateUserPageState extends State<EditUserPage> {
|
||||
int login = userInfoController.model.login!;
|
||||
return LayoutBuilder(
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -134,7 +134,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
bodysize = cc;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
@@ -1458,7 +1458,8 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
color:
|
||||
stringToColor(
|
||||
"FF9F66"),
|
||||
fontSize: 23.rpx,
|
||||
fontSize:
|
||||
23.rpx,
|
||||
letterSpacing:
|
||||
0,
|
||||
),
|
||||
@@ -1504,7 +1505,8 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
color:
|
||||
stringToColor(
|
||||
"FF9F66"),
|
||||
fontSize: 23.rpx,
|
||||
fontSize:
|
||||
23.rpx,
|
||||
letterSpacing:
|
||||
0,
|
||||
),
|
||||
|
||||
@@ -181,59 +181,200 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, boxConstraints) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
title: Container(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'柔性唤醒',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
title: Container(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'柔性唤醒',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Obx(
|
||||
() => Container(
|
||||
padding: EdgeInsets.only(left: 30.rpx, right: 30.rpx),
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height * 1.123,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 40.rpx, right: 16.rpx),
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'柔性唤醒功能',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
|
||||
// height:
|
||||
// MediaQuery.sizeOf(context).height *
|
||||
// 0.04,
|
||||
child: FlutterSwitch(
|
||||
width: 70.rpx,
|
||||
height: 36.rpx,
|
||||
toggleSize: 30.rpx,
|
||||
activeColor: Color(0XFF6BFDAC),
|
||||
inactiveColor: Color(0XFF003058),
|
||||
toggleColor: Color(0xFF011D33),
|
||||
value: controller.model.smysIsStart,
|
||||
onToggle: (val) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.smysIsStart = val;
|
||||
});
|
||||
},
|
||||
)),
|
||||
// Container(
|
||||
// height:
|
||||
// MediaQuery.sizeOf(context).height * 0.04,
|
||||
// child: Switch.adaptive(
|
||||
// value: controller.model.rxhxIsStart,
|
||||
// onChanged: (newValue) async {
|
||||
// controller.attr.update((getmodel) {
|
||||
// getmodel.model.rxhxIsStart = newValue;
|
||||
// });
|
||||
// },
|
||||
// activeTrackColor: const Color(0xFFD3B684),
|
||||
// inactiveTrackColor: const Color(0xFF0A1562),
|
||||
// inactiveThumbColor: const Color(0xFF182B7C),
|
||||
// trackOutlineWidth: MaterialStateProperty
|
||||
// .resolveWith<double?>(
|
||||
// (Set<MaterialState> states) {
|
||||
// if (states
|
||||
// .contains(MaterialState.disabled)) {
|
||||
// return null;
|
||||
// }
|
||||
// return null; // Use the default width.
|
||||
// }),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
getLine(),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
showDayTimeSelectionDialog(context,
|
||||
dayTimeArr: controller.model.rxhxWakeTime,
|
||||
title: "唤醒时间", checkChange: (d) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.rxhxWakeTime = [
|
||||
int.parse("${d[0]}"),
|
||||
int.parse("${d[1]}")
|
||||
];
|
||||
});
|
||||
print("$d");
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 40.rpx, right: 30.rpx),
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'唤醒时间',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
"${controller.model.rxhxWakeTimeToString}",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 16.rpx,
|
||||
),
|
||||
Container(
|
||||
height: 30.rpx,
|
||||
width: 30.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/expand_more.svg',
|
||||
color: Colors.white,
|
||||
))
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 0.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Obx(
|
||||
() => Container(
|
||||
padding: EdgeInsets.only(left: 30.rpx, right: 30.rpx),
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height * 1.123,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 40.rpx, right: 16.rpx),
|
||||
),
|
||||
getLine(),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
showOneSelectionDialog(
|
||||
context,
|
||||
arr: ['开', "关"],
|
||||
checkIndex: controller.model.rxhxIsAnMo ? 0 : 1,
|
||||
title: "按摩",
|
||||
checkChange: (index) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.rxhxIsAnMo =
|
||||
index == 0 ? true : false;
|
||||
});
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 40.rpx, right: 30.rpx),
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
decoration: const BoxDecoration(),
|
||||
@@ -242,7 +383,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'柔性唤醒功能',
|
||||
'按摩',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
@@ -250,255 +391,59 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
|
||||
// height:
|
||||
// MediaQuery.sizeOf(context).height *
|
||||
// 0.04,
|
||||
child: FlutterSwitch(
|
||||
width: 70.rpx,
|
||||
height: 36.rpx,
|
||||
toggleSize: 30.rpx,
|
||||
activeColor: Color(0XFF6BFDAC),
|
||||
inactiveColor: Color(0XFF003058),
|
||||
toggleColor: Color(0xFF011D33),
|
||||
value: controller.model.smysIsStart,
|
||||
onToggle: (val) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.smysIsStart = val;
|
||||
});
|
||||
},
|
||||
)),
|
||||
// Container(
|
||||
// height:
|
||||
// MediaQuery.sizeOf(context).height * 0.04,
|
||||
// child: Switch.adaptive(
|
||||
// value: controller.model.rxhxIsStart,
|
||||
// onChanged: (newValue) async {
|
||||
// controller.attr.update((getmodel) {
|
||||
// getmodel.model.rxhxIsStart = newValue;
|
||||
// });
|
||||
// },
|
||||
// activeTrackColor: const Color(0xFFD3B684),
|
||||
// inactiveTrackColor: const Color(0xFF0A1562),
|
||||
// inactiveThumbColor: const Color(0xFF182B7C),
|
||||
// trackOutlineWidth: MaterialStateProperty
|
||||
// .resolveWith<double?>(
|
||||
// (Set<MaterialState> states) {
|
||||
// if (states
|
||||
// .contains(MaterialState.disabled)) {
|
||||
// return null;
|
||||
// }
|
||||
// return null; // Use the default width.
|
||||
// }),
|
||||
// ),
|
||||
// ),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
controller.model.rxhxIsAnMo ? '开' : '关',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 16.rpx,
|
||||
),
|
||||
Container(
|
||||
height: 30.rpx,
|
||||
width: 30.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/expand_more.svg',
|
||||
color: Colors.white,
|
||||
))
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
getLine(),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
showDayTimeSelectionDialog(context,
|
||||
dayTimeArr: controller.model.rxhxWakeTime,
|
||||
title: "唤醒时间", checkChange: (d) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.rxhxWakeTime = [
|
||||
int.parse("${d[0]}"),
|
||||
int.parse("${d[1]}")
|
||||
];
|
||||
});
|
||||
print("$d");
|
||||
)),
|
||||
),
|
||||
getLine(),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
showOneSelectionDialog(
|
||||
context,
|
||||
arr: location,
|
||||
checkIndex: controller.model.rxhxLocation,
|
||||
title: "唤醒部位",
|
||||
checkChange: (index) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.rxhxLocation = index;
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
margin:
|
||||
EdgeInsets.only(left: 40.rpx, right: 30.rpx),
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'唤醒时间',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
"${controller.model.rxhxWakeTimeToString}",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 16.rpx,
|
||||
),
|
||||
Container(
|
||||
height: 30.rpx,
|
||||
width: 30.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/expand_more.svg',
|
||||
color: Colors.white,
|
||||
))
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
getLine(),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
showOneSelectionDialog(
|
||||
context,
|
||||
arr: ['开', "关"],
|
||||
checkIndex: controller.model.rxhxIsAnMo ? 0 : 1,
|
||||
title: "按摩",
|
||||
checkChange: (index) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.rxhxIsAnMo =
|
||||
index == 0 ? true : false;
|
||||
});
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
margin:
|
||||
EdgeInsets.only(left: 40.rpx, right: 30.rpx),
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'按摩',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
controller.model.rxhxIsAnMo ? '开' : '关',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 16.rpx,
|
||||
),
|
||||
Container(
|
||||
height: 30.rpx,
|
||||
width: 30.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/expand_more.svg',
|
||||
color: Colors.white,
|
||||
))
|
||||
],
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
getLine(),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
showOneSelectionDialog(
|
||||
context,
|
||||
arr: location,
|
||||
checkIndex: controller.model.rxhxLocation,
|
||||
title: "唤醒部位",
|
||||
checkChange: (index) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.rxhxLocation = index;
|
||||
});
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
margin:
|
||||
EdgeInsets.only(left: 40.rpx, right: 30.rpx),
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'唤醒部位',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
location[controller.model.rxhxLocation],
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 16.rpx,
|
||||
),
|
||||
Container(
|
||||
height: 30.rpx,
|
||||
width: 30.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/expand_more.svg',
|
||||
color: Colors.white,
|
||||
))
|
||||
],
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
getLine(),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 30.rpx,
|
||||
bottom: 30.rpx,
|
||||
left: 40.rpx,
|
||||
right: 30.rpx),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 40.rpx, right: 30.rpx),
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Column(
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'自定义',
|
||||
'唤醒部位',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
@@ -506,175 +451,220 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
// Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 0, 20.rpx, 0, 0),
|
||||
// child: Container(
|
||||
// width: double.infinity,
|
||||
// height:
|
||||
// MediaQuery.sizeOf(context).height * 0.046,
|
||||
// decoration: const BoxDecoration(),
|
||||
// child: Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// ...List.generate(7, (index) {
|
||||
// return InkWell(
|
||||
// onTap: () {
|
||||
// controller.attr.update((getmodel) {
|
||||
// getmodel.model
|
||||
// .rxhxWeeks[index] = getmodel
|
||||
// .model
|
||||
// .rxhxWeeks[index] ==
|
||||
// 0
|
||||
// ? 1
|
||||
// : 0;
|
||||
// });
|
||||
// },
|
||||
// child: AspectRatio(
|
||||
// aspectRatio: 1,
|
||||
// child: ClipOval(
|
||||
// child: Container(
|
||||
// height: double.infinity,
|
||||
// decoration: BoxDecoration(
|
||||
// color: controller.model
|
||||
// .rxhxWeeks[
|
||||
// index] ==
|
||||
// 1
|
||||
// ? Color(0xFF84F5FF)
|
||||
// : Color(0XFF003058)),
|
||||
// child: Center(
|
||||
// child: Text(
|
||||
// weeks[index],
|
||||
// style: TextStyle(
|
||||
// color: controller.model
|
||||
// .rxhxWeeks[
|
||||
// index] ==
|
||||
// 1
|
||||
// ? Color(0XFF003058)
|
||||
// : Colors.white),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 20.rpx, 0, 0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
height:
|
||||
MediaQuery.sizeOf(context).height * 0.046,
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: List.generate(7, (index) {
|
||||
final bool selected =
|
||||
controller.model.rxhxWeeks[index] ==
|
||||
1;
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.rxhxWeeks[index] =
|
||||
getmodel.model
|
||||
.rxhxWeeks[index] ==
|
||||
0
|
||||
? 1
|
||||
: 0;
|
||||
});
|
||||
},
|
||||
borderRadius: BorderRadius.circular(
|
||||
50), // 点击水波圆角区域
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context)
|
||||
.height *
|
||||
0.046, // 保证是正圆
|
||||
height: MediaQuery.sizeOf(context)
|
||||
.height *
|
||||
0.046,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: selected
|
||||
? const Color(0xFF84F5FF)
|
||||
: const Color(0xFF003058),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
weeks[index],
|
||||
style: TextStyle(
|
||||
color: selected
|
||||
? const Color(0xFF003058)
|
||||
: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
location[controller.model.rxhxLocation],
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
SizedBox(
|
||||
width: 16.rpx,
|
||||
),
|
||||
Container(
|
||||
height: 30.rpx,
|
||||
width: 30.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/expand_more.svg',
|
||||
color: Colors.white,
|
||||
))
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
getLine(),
|
||||
SizedBox(
|
||||
height: 30.rpx,
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 26.rpx, right: 26.rpx),
|
||||
width: double.infinity,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Text(
|
||||
'*注:开启该功能后,在设置的时间点,设备将启动一段固定时长的柔性唤醒功能。',
|
||||
)),
|
||||
),
|
||||
getLine(),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 30.rpx,
|
||||
bottom: 30.rpx,
|
||||
left: 40.rpx,
|
||||
right: 30.rpx),
|
||||
width: double.infinity,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'自定义',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF929699),
|
||||
fontSize: 20.rpx,
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 85.rpx),
|
||||
child: CustomCard(
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {},
|
||||
colors: const [
|
||||
Color(0xFFFCFCFC),
|
||||
Color(0xFFF8FAF9),
|
||||
Color(0XFFECF6F3),
|
||||
Color(0XFFD9F0E9),
|
||||
Color(0xFFCEECE3)
|
||||
],
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: Text("完成",
|
||||
style: TextStyle(
|
||||
color: const Color(0xFF003058),
|
||||
fontSize: 26.rpx)),
|
||||
// Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 0, 20.rpx, 0, 0),
|
||||
// child: Container(
|
||||
// width: double.infinity,
|
||||
// height:
|
||||
// MediaQuery.sizeOf(context).height * 0.046,
|
||||
// decoration: const BoxDecoration(),
|
||||
// child: Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// ...List.generate(7, (index) {
|
||||
// return InkWell(
|
||||
// onTap: () {
|
||||
// controller.attr.update((getmodel) {
|
||||
// getmodel.model
|
||||
// .rxhxWeeks[index] = getmodel
|
||||
// .model
|
||||
// .rxhxWeeks[index] ==
|
||||
// 0
|
||||
// ? 1
|
||||
// : 0;
|
||||
// });
|
||||
// },
|
||||
// child: AspectRatio(
|
||||
// aspectRatio: 1,
|
||||
// child: ClipOval(
|
||||
// child: Container(
|
||||
// height: double.infinity,
|
||||
// decoration: BoxDecoration(
|
||||
// color: controller.model
|
||||
// .rxhxWeeks[
|
||||
// index] ==
|
||||
// 1
|
||||
// ? Color(0xFF84F5FF)
|
||||
// : Color(0XFF003058)),
|
||||
// child: Center(
|
||||
// child: Text(
|
||||
// weeks[index],
|
||||
// style: TextStyle(
|
||||
// color: controller.model
|
||||
// .rxhxWeeks[
|
||||
// index] ==
|
||||
// 1
|
||||
// ? Color(0XFF003058)
|
||||
// : Colors.white),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0, 20.rpx, 0, 0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.sizeOf(context).height * 0.046,
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: List.generate(7, (index) {
|
||||
final bool selected =
|
||||
controller.model.rxhxWeeks[index] == 1;
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.rxhxWeeks[index] =
|
||||
getmodel.model.rxhxWeeks[index] == 0
|
||||
? 1
|
||||
: 0;
|
||||
});
|
||||
},
|
||||
borderRadius:
|
||||
BorderRadius.circular(50), // 点击水波圆角区域
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).height *
|
||||
0.046, // 保证是正圆
|
||||
height:
|
||||
MediaQuery.sizeOf(context).height *
|
||||
0.046,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: selected
|
||||
? const Color(0xFF84F5FF)
|
||||
: const Color(0xFF003058),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
weeks[index],
|
||||
style: TextStyle(
|
||||
color: selected
|
||||
? const Color(0xFF003058)
|
||||
: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
getLine(),
|
||||
SizedBox(
|
||||
height: 30.rpx,
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 26.rpx, right: 26.rpx),
|
||||
width: double.infinity,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Text(
|
||||
'*注:开启该功能后,在设置的时间点,设备将启动一段固定时长的柔性唤醒功能。',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF929699),
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 85.rpx),
|
||||
child: CustomCard(
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {},
|
||||
colors: const [
|
||||
Color(0xFFFCFCFC),
|
||||
Color(0xFFF8FAF9),
|
||||
Color(0XFFECF6F3),
|
||||
Color(0XFFD9F0E9),
|
||||
Color(0xFFCEECE3)
|
||||
],
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: Text("完成",
|
||||
style: TextStyle(
|
||||
color: const Color(0xFF003058),
|
||||
fontSize: 26.rpx)),
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
),
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
bodysize = cc;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
@@ -42,7 +42,7 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
// key: scaffoldKey,
|
||||
// key: scaffoldKey,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
// backgroundColor: Colors.transparent,
|
||||
@@ -601,7 +601,7 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
||||
UnderlineInputBorder(
|
||||
borderSide:
|
||||
BorderSide(
|
||||
color: Colors.red,
|
||||
color: Colors.red,
|
||||
width: 2,
|
||||
),
|
||||
borderRadius:
|
||||
@@ -753,7 +753,7 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
||||
UnderlineInputBorder(
|
||||
borderSide:
|
||||
BorderSide(
|
||||
color: Colors.red,
|
||||
color: Colors.red,
|
||||
width: 2,
|
||||
),
|
||||
borderRadius:
|
||||
|
||||
@@ -41,7 +41,7 @@ class _UserAgreementPageState extends State<UserAgreementPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
||||
Reference in New Issue
Block a user