pile_nav_new/lib/controllers/appcontroller.dart

25 lines
532 B
Dart
Raw Normal View History

2024-08-30 17:57:33 +08:00
import 'package:get/get.dart';
2024-09-03 18:05:49 +08:00
import 'package:scence_map/controllers/controller.dart';
2024-08-30 17:57:33 +08:00
class AppController extends GetxController {
final RxBool isDarkMode = false.obs;
2024-09-03 18:05:49 +08:00
var currentIndex = 0.obs;
@override
void onInit() {
super.onInit();
2024-09-05 12:06:03 +08:00
2024-09-03 18:05:49 +08:00
final mapcontroller = Get.find<ScenceMapController>();
// 绑定 currentIndex
ever(currentIndex, (value) {
mapcontroller.currentIndex.value = value;
currentIndex.value = value;
});
2024-11-15 17:42:52 +08:00
// ever(mapcontroller.currentIndex, (value) {
// });
2024-09-03 18:05:49 +08:00
}
2024-08-30 17:57:33 +08:00
}