app_constants.dart 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /// 应用常量
  2. class AppConstants {
  3. AppConstants._();
  4. // ==================== 应用信息 ====================
  5. /// 应用名称
  6. static const String appName = '中方诊药云';
  7. /// 应用版本
  8. static const String appVersion = '1.0.0';
  9. /// 包名
  10. static const String packageName = 'com.sinomed.cloud';
  11. // ==================== 存储 Key ====================
  12. /// Token 存储 Key
  13. static const String keyToken = 'access_token';
  14. /// 用户信息存储 Key
  15. static const String keyUserInfo = 'user_info';
  16. /// 语言设置 Key
  17. static const String keyLanguage = 'app_language';
  18. /// 主题设置 Key
  19. static const String keyTheme = 'app_theme';
  20. /// 首次启动 Key
  21. static const String keyFirstLaunch = 'first_launch';
  22. // ==================== 验证码相关 ====================
  23. /// 验证码长度
  24. static const int smsCodeLength = 6;
  25. /// 验证码倒计时(秒)
  26. static const int smsCodeCountdown = 60;
  27. /// 验证码有效期(分钟)
  28. static const int smsCodeExpireMinutes = 5;
  29. // ==================== 密码相关 ====================
  30. /// 密码最小长度
  31. static const int passwordMinLength = 6;
  32. /// 密码最大长度
  33. static const int passwordMaxLength = 20;
  34. // ==================== 分页相关 ====================
  35. /// 默认每页数量
  36. static const int defaultPageSize = 20;
  37. /// 最大每页数量
  38. static const int maxPageSize = 100;
  39. // ==================== 网络相关 ====================
  40. /// 请求重试次数
  41. static const int maxRetryCount = 3;
  42. /// 请求重试延迟(毫秒)
  43. static const int retryDelayMs = 1000;
  44. // ==================== 日期时间格式 ====================
  45. /// 日期格式
  46. static const String dateFormat = 'yyyy-MM-dd';
  47. /// 时间格式
  48. static const String timeFormat = 'HH:mm:ss';
  49. /// 日期时间格式
  50. static const String dateTimeFormat = 'yyyy-MM-dd HH:mm:ss';
  51. }