|
@@ -1,6 +1,7 @@
|
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:flutter/services.dart';
|
|
|
import 'package:get/get.dart';
|
|
|
+import 'package:vitalapp/architecture/utils/confirm_box.dart';
|
|
|
import 'package:vitalapp/components/alert_dialog.dart';
|
|
|
|
|
|
class UsbState {
|
|
@@ -35,24 +36,29 @@ class UsbState {
|
|
|
}
|
|
|
|
|
|
void alertReboot() {
|
|
|
- Get.dialog(
|
|
|
- VAlertDialog(
|
|
|
- title: "提示",
|
|
|
- width: 420,
|
|
|
- content: Container(
|
|
|
- height: 32,
|
|
|
- padding: const EdgeInsets.symmetric(horizontal: 24),
|
|
|
- alignment: Alignment.center,
|
|
|
- child: const Text(
|
|
|
- "检测到 USB 硬件发生变化,为保证程序正常运行,建议重启设备",
|
|
|
- style: TextStyle(fontSize: 20),
|
|
|
- ),
|
|
|
- ),
|
|
|
- showCancel: false,
|
|
|
- onConfirm: () async {
|
|
|
- Get.back();
|
|
|
- },
|
|
|
- ),
|
|
|
+ ConfirmBox.showMultiLines(
|
|
|
+ contents: ["检测到 USB 硬件发生变化", "(为保证程序正常运行,建议重启设备)"],
|
|
|
+ width: 500,
|
|
|
+ showCancel: false,
|
|
|
);
|
|
|
+ // Get.dialog(
|
|
|
+ // VAlertDialog(
|
|
|
+ // title: "提示",
|
|
|
+ // width: 420,
|
|
|
+ // content: Container(
|
|
|
+ // height: 32,
|
|
|
+ // padding: const EdgeInsets.symmetric(horizontal: 24),
|
|
|
+ // alignment: Alignment.center,
|
|
|
+ // child: const Text(
|
|
|
+ // "检测到 USB 硬件发生变化,为保证程序正常运行,建议重启设备",
|
|
|
+ // style: TextStyle(fontSize: 20),
|
|
|
+ // ),
|
|
|
+ // ),
|
|
|
+ // showCancel: false,
|
|
|
+ // onConfirm: () async {
|
|
|
+ // Get.back();
|
|
|
+ // },
|
|
|
+ // ),
|
|
|
+ // );
|
|
|
}
|
|
|
}
|