alroyso 1 year ago
parent
commit
32bf48f1c9
1 changed files with 6 additions and 6 deletions
  1. 6 6
      lib/app/modules/home/views/home_view.dart

+ 6 - 6
lib/app/modules/home/views/home_view.dart

@@ -199,16 +199,16 @@ class HomeView extends GetView<HomeController> {
                   padding: const EdgeInsets.fromLTRB(60, 10, 50, 0),
                   child: Row(
                     children: [
-                      ElevatedButton(onPressed: (){
+                      ElevatedButton(onPressed: () async {
                         if(controller.serviceStuatus.value){
-                          controller.installService();
+                          await controller.installService();
                         } else{
-                          controller.UninstallService();
+                          await controller.UninstallService();
                         }
-                      }, child: controller.serviceStuatus.value == true ? const Text("安装服务") : const Text("卸载服务")),
+                      }, child: controller.serviceStuatus.value == false ? const Text("安装服务") : const Text("卸载服务")),
                       const SizedBox(width: 10,),
-                      ElevatedButton(onPressed: (){
-                        controller.coreRestart();
+                      ElevatedButton(onPressed: () async{
+                        await controller.coreRestart();
                       }, child: const Text("重启内核")),
                     ],