25 lines
532 B
Dart
25 lines
532 B
Dart
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<ScenceMapController>();
|
|
|
|
// 绑定 currentIndex
|
|
ever(currentIndex, (value) {
|
|
mapcontroller.currentIndex.value = value;
|
|
currentIndex.value = value;
|
|
});
|
|
|
|
// ever(mapcontroller.currentIndex, (value) {
|
|
|
|
// });
|
|
}
|
|
}
|