深色模式、首页设置页面和功能优化
This commit is contained in:
21
lib/services/get/main_navigation_controller.dart
Normal file
21
lib/services/get/main_navigation_controller.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
/// 时间: 2025-03-21
|
||||
/// 功能: 主导航控制器,管理底部导航栏的状态
|
||||
/// 介绍: 负责管理当前选中的页面索引,提供页面切换的方法
|
||||
class MainNavigationController extends GetxController {
|
||||
// 当前选中的页面索引
|
||||
final currentIndex = 0.obs;
|
||||
|
||||
// 切换页面
|
||||
void switchPage(int index) {
|
||||
currentIndex.value = index;
|
||||
update();
|
||||
}
|
||||
|
||||
// 刷新个人页面数据
|
||||
void refreshProfileData() {
|
||||
// 这里可以通过Get.find()获取ProfileController并调用其刷新方法
|
||||
// 但为了避免循环依赖,我们让ProfilePage自己处理刷新逻辑
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user