Files
wushu/lib/services/get/main_navigation_controller.dart
2026-04-02 07:06:55 +08:00

22 lines
652 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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自己处理刷新逻辑
}
}