|
@@ -193,25 +193,18 @@ class HomeView extends GetView<HomeController> {
|
|
|
],
|
|
|
),
|
|
|
),
|
|
|
- // Padding(
|
|
|
- // padding: const EdgeInsets.fromLTRB(60, 10, 50, 0),
|
|
|
- // child: Row(
|
|
|
- // children: [
|
|
|
- // ElevatedButton(onPressed: () async {
|
|
|
- // if(controller.serviceStuatus.value == false){
|
|
|
- // await controller.installService();
|
|
|
- // } else{
|
|
|
- // await controller.UninstallService();
|
|
|
- // }
|
|
|
- // }, child: controller.serviceStuatus.value == false ? const Text("安装服务") : const Text("卸载服务")),
|
|
|
- // const SizedBox(width: 10,),
|
|
|
- // ElevatedButton(onPressed: () async{
|
|
|
- // await controller.coreRestart();
|
|
|
- // }, child: const Text("重启内核")),
|
|
|
- // ],
|
|
|
- //
|
|
|
- // ),
|
|
|
- // )
|
|
|
+ controllers.service.serviceMode.value == true ? Padding(
|
|
|
+ padding: const EdgeInsets.fromLTRB(60, 10, 50, 0),
|
|
|
+ child: Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
+ children: [
|
|
|
+ ElevatedButton(onPressed: () async {
|
|
|
+ await controllers.service.serviceModeSwitch(false);
|
|
|
+ }, child: const Text("卸载服务")),
|
|
|
+ ],
|
|
|
+
|
|
|
+ ),
|
|
|
+ ) : Container()
|
|
|
// const SizedBox(height: 20,),
|
|
|
// Align(
|
|
|
// alignment: Alignment.center,
|