sp_keys.dart 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /// SharedPreferences 键名常量统一管理
  2. class SPKeys {
  3. SPKeys._();
  4. /// 设备ID
  5. static const String deviceId = 'omon_device_id';
  6. /// FCM Token
  7. static const String fcmToken = 'fcm_token';
  8. /// 当前语言
  9. static const String currentLocal = 'current_local';
  10. /// 主题是否为浅色
  11. static const String lightTheme = 'is_theme_light';
  12. /// 是否启动游戏
  13. static const String launchGame = 'is_launch_game';
  14. /// 忽略的版本号
  15. static const String ignoreVersion = 'ignore_version';
  16. /// 是否新安装
  17. static const String isNewInstall = 'is_new_install';
  18. /// Launch 数据
  19. static const String launchData = 'launch_data';
  20. /// 是否地区禁用
  21. static const String isRegionDisabled = 'is_region_disabled';
  22. /// 是否用户禁用
  23. static const String isUserDisabled = 'is_user_disabled';
  24. /// 是否设备禁用
  25. static const String isDeviceDisabled = 'is_device_disabled';
  26. /// 最后一次上传的性能日志 boostSessionId
  27. static const String lastMetricsLog = 'last_metrics_log';
  28. /// 最后一次上传的 ES 日志 boostSessionId
  29. static const String lastESLog = 'last_es_log';
  30. /// 是否开启 debug log
  31. static const String enableDebugLog = 'enable_debug_log';
  32. /// 是否开启 ping(0默认 1开启 2关闭)
  33. static const String enablePingMode = 'enable_ping_mode';
  34. /// 当前选中的节点
  35. static const String selectedLocation = 'selected_location';
  36. /// 最近选择的节点列表
  37. static const String recentLocations = 'recent_locations';
  38. /// 路由模式选择
  39. static const String routingModeSelected = 'routing_mode_selected';
  40. /// 分流隧道选中的模式
  41. static const String splittunnelingSelectedMode =
  42. 'splittunneling_selected_mode';
  43. /// 分流隧道缓存应用
  44. static const String splittunnelingCachedApps = 'splittunneling_cached_apps';
  45. /// 分流隧道排除模式选中的应用
  46. static const String splittunnelingExcludeSelectedApps =
  47. 'splittunneling_exclude_selected_apps';
  48. /// 分流隧道包含模式选中的应用
  49. static const String splittunnelingIncludeSelectedApps =
  50. 'splittunneling_include_selected_apps';
  51. /// Banner 缓存键前缀(完整键为 banner_cache_{position})
  52. static const String bannerCachePrefix = 'banner_cache_';
  53. /// 获取指定位置的 banner 缓存键
  54. static String bannerCacheKey(String position) =>
  55. '$bannerCachePrefix$position';
  56. }