This commit is contained in:
wyf
2025-04-12 18:13:35 +08:00
parent 9396f18d09
commit 146462b467
17 changed files with 1446 additions and 816 deletions

View File

@@ -124,16 +124,20 @@ class _EPageState extends State<DeviceTypePage> {
),
Container(
width: double.infinity,
height: MediaQuery.sizeOf(context).height *
0.26,
height: (MediaQuery.sizeOf(context).width) *
0.13,
constraints: BoxConstraints(
minHeight: 421.rpx,
minHeight: 200.rpx,
),
child: ClipRRect(
borderRadius:
BorderRadius.circular(20.rpx),
child: Image.network(
'https://picsum.photos/seed/861/600',
// child: Image.network(
// 'https://picsum.photos/seed/861/600',
// fit: BoxFit.cover,
// ),
child: Image.asset(
"assets/img/help_op.png",
fit: BoxFit.cover,
),
),
@@ -159,12 +163,52 @@ class _EPageState extends State<DeviceTypePage> {
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Icon(
Icons.arrow_back,
color: FlutterFlowTheme.of(context)
.primaryText,
size: 24.rpx,
),
Theme(
data: ThemeData(
checkboxTheme: CheckboxThemeData(
visualDensity:
VisualDensity.compact,
materialTapTargetSize:
MaterialTapTargetSize
.shrinkWrap,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(64),
),
),
unselectedWidgetColor:
Color(0xFFD3D3D3),
),
child: Obx(
() => Checkbox(
value: userInfoController
.model.register_agree ??
false,
onChanged: (newValue) async {
userInfoController.model
.register_agree =
newValue;
userInfoController
.updateAll();
// 获取设备信息,需要用户点击确认隐私协议与用户协议选择框时才能获取
// if (newValue == true) {
// Deviceconfig
// .initPlatformState();
// }
},
side: BorderSide(
width: 1.5,
color: FlutterFlowTheme.of(
context)
.secondaryText,
),
activeColor:
stringToColor("#16C89F"),
checkColor:
FlutterFlowTheme.of(context)
.info,
),
)),
Text(
'绑定引导.不再提示'.tr,
style: FlutterFlowTheme.of(context)
@@ -182,12 +226,13 @@ class _EPageState extends State<DeviceTypePage> {
borderRadius: 50.rpx,
onTap: () async {
await Future.delayed(
Duration(seconds: 1));
Duration(milliseconds: 500));
Get.back(); // 关闭当前弹窗或页面
},
colors: [
Colors.yellow,
Colors.green
//todo 颜色
stringToColor("45D989"),
stringToColor("00C1AA")
], // 单色背景也用渐变写法
title: '',
child: Container(
@@ -250,7 +295,7 @@ class _EPageState extends State<DeviceTypePage> {
backgroundColor: stringToColor("#242835"),
// backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
// iconTheme: IconThemeData(color: Colors.white),
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
// leading: returnIconButtom,
title: Container(
@@ -283,6 +328,7 @@ class _EPageState extends State<DeviceTypePage> {
actions: [],
centerTitle: false,
),
body: SafeArea(
top: true,
child: Padding(
@@ -295,16 +341,19 @@ class _EPageState extends State<DeviceTypePage> {
context,
title: '设备类型.体征监测设备'.tr,
imageUrl: 'assets/img/device.png',
type: '1',
),
_buildDeviceCard(
context,
title: '设备类型.智能床/床垫'.tr,
imageUrl: 'assets/img/bed.png',
type: '2',
),
_buildDeviceCard(
context,
title: '设备类型.摄像头'.tr,
imageUrl: 'assets/img/camera.png',
type: '3',
),
]
.divide(SizedBox(height: 26.rpx))
@@ -321,14 +370,18 @@ class _EPageState extends State<DeviceTypePage> {
}
Widget _buildDeviceCard(BuildContext context,
{required String title, required String imageUrl}) {
{required String title, required String imageUrl, required String type}) {
return CustomCard(
borderRadius: 20.rpx, // 圆角大小
onTap: () {
print('点击了 $title');
if (type != null) {
if (type == '1') {
Get.toNamed("/blueteethDevice");
}
}
},
// colors: [Colors.white.withOpacity(0.06)], // 背景色
colors: [stringToColor("45D989"), stringToColor("00C1AA")], // 背景色
colors: [stringToColor("#242835")], // 背景色
title: title,
child: Container(
width: double.infinity,