解绑设备

This commit is contained in:
czz
2025-06-24 17:07:32 +08:00
parent 1522f2e4c9
commit 65f7b577df
3 changed files with 15 additions and 6 deletions

View File

@@ -172,9 +172,12 @@ class BluetoothPage extends GetView {
showUnbindConfirmDialog(
context: context,
title: "是否进行解绑?",
onConfirm: () {
deviceListController
onConfirm: () async {
await deviceListController
.unbindDevice(data);
await deviceListController
.getDeviceList();
Get.toNamed("/homePage");
// 执行解绑逻辑
},
onCancel: () {
@@ -186,10 +189,14 @@ class BluetoothPage extends GetView {
showDeleteDeviceConfirmDialog(
context: context,
title: "是否进行删除?",
onConfirm: () {
deviceListController.unbindDevice(
onConfirm: () async {
await deviceListController
.unbindDevice(
data,
);
await deviceListController
.getDeviceList();
Get.toNamed("/homePage");
},
onCancel: () {
// 点击取消后的逻辑