import 'package:get/get.dart'; import 'package:scence_map/controllers/controller.dart'; class AppController extends GetxController { final RxBool isDarkMode = false.obs; var currentIndex = 0.obs; @override void onInit() { super.onInit(); final mapcontroller = Get.find(); // 绑定 currentIndex ever(currentIndex, (value) { mapcontroller.currentIndex.value = value; currentIndex.value = value; }); // ever(mapcontroller.currentIndex, (value) { // }); } }