gcx/frontend/genex-mobile/lib/features/profile
hailin e7c1e33355 fix(genex-mobile): 语言偏好持久化 — 用户选择不再因重启丢失
修复 LocaleManager 仅用内存 ValueNotifier 存储语言选择的问题,
重启 App 后用户选的语言会丢失,回退到系统语言。

改动:
- pubspec.yaml: 添加 shared_preferences 依赖
- locale_manager.dart: 新增 init() 启动恢复 + setLocale() 写入持久化
  · null = 跟随系统语言(清除 SP 记录)
  · 非 null = 持久化到 SharedPreferences,重启后自动恢复
- main.dart: 启动时调用 await LocaleManager.init()
- settings_page.dart: 语言选择改用 LocaleManager.setLocale()

行为:首次安装跟随系统语言 → 用户选择后持久化 → 重启保持不变

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 19:39:07 -08:00
..
presentation/pages fix(genex-mobile): 语言偏好持久化 — 用户选择不再因重启丢失 2026-03-03 19:39:07 -08:00