enums.dart 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //页面状态
  2. enum ViewState {
  3. loading, // 加载中
  4. success, // 加载成功
  5. empty, // 空数据
  6. error, // 错误
  7. }
  8. enum SplashType {
  9. normal, // 正常
  10. signin, // 登录
  11. signup, // 注册
  12. google, // 谷歌登录
  13. apple, // 苹果登录
  14. facebook, // 脸书登录
  15. logout, // 退出登录
  16. }
  17. enum RegisterMode {
  18. auto(1, 'Auto'),
  19. manual(2, 'Manual'),
  20. buy(3, 'Buy'),
  21. gen(4, 'Gen');
  22. final int value;
  23. final String label;
  24. const RegisterMode(this.value, this.label);
  25. }
  26. enum AccountType {
  27. activate, // 激活
  28. changePassword, // 修改密码
  29. }
  30. enum BannerAction {
  31. notice, // 弹窗通知
  32. page, // 路由跳转
  33. urlOut, // 网页外部跳转
  34. urlIn, // 网页内部跳转
  35. deepLink, // scheme跳转
  36. openPkg, // 打开app
  37. }
  38. enum LogLevel { info, error, warn, debug, verbose }
  39. enum FirebaseEvent {
  40. launch,
  41. launchCache,
  42. launchSuccess,
  43. launchCacheSuccess,
  44. register,
  45. login,
  46. logout,
  47. providerLogin,
  48. startBoost,
  49. cancelBoost,
  50. errorBoost,
  51. stopBoost,
  52. zipLog,
  53. }
  54. enum ConnectionState {
  55. disconnected, // 默认状态
  56. connecting, // 连接中状态
  57. connected, // 连接成功状态
  58. disconnecting, // 断开连接中状态
  59. error, // 连接错误状态
  60. }