This commit is contained in:
wyf
2025-06-21 21:22:04 +08:00
parent ca1995372c
commit 6588b4f053
18 changed files with 170 additions and 161 deletions

View File

@@ -5,6 +5,7 @@ import 'package:flutter_switch/flutter_switch.dart';
import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
import 'package:vbvs_app/pages/mh_page/test/WebviewTestModel.dart';
class MattressControlPage extends StatefulWidget {
const MattressControlPage({super.key});
@@ -62,101 +63,84 @@ class _MattressControlPageState extends State<MattressControlPage> {
child: Scaffold(
backgroundColor: Colors.transparent,
// 顶部返回 + 设备选择 + 蓝牙图标 + 设置按钮
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
titleSpacing: 0,
elevation: 0,
title: SizedBox(
width: double.infinity,
height: 180.rpx,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(width: 20.rpx),
returnIconButtomNew,
SizedBox(width: 26.rpx),
Container(
decoration: BoxDecoration(
color: const Color(0xFF003058),
borderRadius: BorderRadius.circular(30.rpx),
),
constraints: BoxConstraints(
minHeight: 60.rpx,
maxHeight: 60.rpx,
maxWidth: 260.rpx,
minWidth: 260.rpx),
padding: EdgeInsets.symmetric(
horizontal: 20.rpx), // 加左右边距
child: DropdownButton<String>(
value: 'Eason Chan',
underline: const SizedBox(),
dropdownColor: Colors.blueGrey,
iconEnabledColor: Colors.white,
icon: Icon(
Icons.keyboard_arrow_down, // 最常用的向下箭头
color: Colors.white,
size: 30.rpx,
),
style: const TextStyle(color: Colors.white),
isExpanded: true,
items: const [
DropdownMenuItem(
value: 'Eason Chan',
child: Text('Eason Chan'),
),
DropdownMenuItem(
value: 'Anna',
child: Text('Anna'),
),
],
onChanged: (_) {},
),
),
],
)),
actions: [
ClickableContainer(
backgroundColor: Colors.transparent,
highlightColor: Colors.transparent,
padding: EdgeInsets.only(right: 69.rpx),
onTap: () {},
child:
//根据data['status']判断用那个svg
Image.asset(
'assets/images/active_bluetooth.png',
width: 42.rpx,
height: 42.rpx,
),
),
ClickableContainer(
backgroundColor: Colors.transparent,
highlightColor: Colors.transparent,
padding: EdgeInsets.only(right: 38.rpx),
onTap: () {
Get.toNamed('/bluetoothPage', arguments: data);
},
child: Icon(Icons.tune,
color: Colors.white, size: 42.rpx))
],
centerTitle: false,
),
body: const SafeArea(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Center(
child: Text(
"等待引入",
style: TextStyle(
color: Colors.white,
),
))
// appBar: AppBar(
// backgroundColor: Colors.transparent,
// automaticallyImplyLeading: false,
// titleSpacing: 0,
// elevation: 0,
// title: SizedBox(
// width: double.infinity,
// height: 180.rpx,
// child: Row(
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// SizedBox(width: 20.rpx),
// returnIconButtomNew,
// SizedBox(width: 26.rpx),
// Container(
// decoration: BoxDecoration(
// color: Color(0xFF003058),
// borderRadius: BorderRadius.circular(30.rpx),
// ),
// constraints: BoxConstraints(
// minHeight: 60.rpx,
// maxHeight: 60.rpx,
// maxWidth: 260.rpx,
// minWidth: 260.rpx),
// padding: EdgeInsets.symmetric(
// horizontal: 20.rpx), // 加左右边距
// child: DropdownButton<String>(
// value: 'Eason Chan',
// underline: const SizedBox(),
// dropdownColor: Colors.blueGrey,
// iconEnabledColor: Colors.white,
// style: const TextStyle(color: Colors.white),
// isExpanded: true,
// items: const [
// DropdownMenuItem(
// value: 'Eason Chan',
// child: Text('Eason Chan'),
// ),
// DropdownMenuItem(
// value: 'Anna',
// child: Text('Anna'),
// ),
// ],
// onChanged: (_) {},
// ),
// ),
// ],
// )),
// actions: [
// ClickableContainer(
// backgroundColor: Colors.transparent,
// highlightColor: Colors.transparent,
// padding: EdgeInsets.only(right: 69.rpx),
// onTap: () {},
// child: Icon(
// Icons.bluetooth,
// color: Colors.white,
// size: 42.rpx,
// ),
// ),
// ClickableContainer(
// backgroundColor: Colors.transparent,
// highlightColor: Colors.transparent,
// padding: EdgeInsets.only(right: 38.rpx),
// onTap: () {
// Get.toNamed('/bluetoothPage', arguments: data);
// },
// child: Icon(Icons.tune,
// color: Colors.white, size: 42.rpx))
// ],
// centerTitle: false,
// ),
// _buildBedImageSection(context),
// _buildModeSelector(context),
// Expanded(child: _buildControlCards(context)),
],
body: SafeArea(
child: WebviewTestView(
oncreate: (widget) {
return WebviewTestController();
},
),
),
))));