设备 预约接口
This commit is contained in:
@@ -6,16 +6,12 @@ import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
|
||||
class BluetoothPage extends StatefulWidget {
|
||||
BluetoothPage({super.key});
|
||||
class BluetoothPage extends GetView {
|
||||
Map data;
|
||||
BluetoothPage({required this.data});
|
||||
|
||||
@override
|
||||
State<BluetoothPage> createState() => _BluetoothState();
|
||||
}
|
||||
BoxConstraints? bodysize;
|
||||
|
||||
BoxConstraints? bodysize;
|
||||
|
||||
class _BluetoothState extends State<BluetoothPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
@@ -74,11 +70,13 @@ class _BluetoothState extends State<BluetoothPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('TomFayer',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 40.rpx,
|
||||
)),
|
||||
Text(
|
||||
data['name']?.toString() ?? '未命名',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 40.rpx,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 27.rpx),
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
@@ -130,9 +128,11 @@ class _BluetoothState extends State<BluetoothPage> {
|
||||
padding: EdgeInsets.symmetric(horizontal: 30.rpx),
|
||||
children: [
|
||||
_buildMenuButton(
|
||||
context, '详情', "/devicePeopleInfo"),
|
||||
context, '详情', "/devicePeopleInfo",
|
||||
arguments: data),
|
||||
_buildMenuButton(
|
||||
context, '人员资料', "/peopleInfoPage"),
|
||||
context, '人员资料', "/peopleInfoPage",
|
||||
arguments: data),
|
||||
_buildMenuButton(
|
||||
context, '房间选择', "/roomPickerPage"),
|
||||
_buildMenuButton(
|
||||
@@ -157,16 +157,21 @@ class _BluetoothState extends State<BluetoothPage> {
|
||||
});
|
||||
}
|
||||
|
||||
Widget _buildMenuButton(BuildContext context, String title, String? path) {
|
||||
Widget _buildMenuButton(BuildContext context, String title, String? path,
|
||||
{Map<dynamic, dynamic>? arguments}) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(bottom: 19.rpx), // 将 margin 外移
|
||||
padding: EdgeInsets.only(bottom: 19.rpx),
|
||||
child: ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Color(0XFF055466),
|
||||
padding: EdgeInsets.only(left: 0),
|
||||
onTap: () {
|
||||
if (path?.isNotEmpty == true) {
|
||||
Get.toNamed(path!);
|
||||
if (arguments != null) {
|
||||
Get.toNamed(path!, arguments: arguments);
|
||||
} else {
|
||||
Get.toNamed(path!);
|
||||
}
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
|
||||
Reference in New Issue
Block a user