o2_native_app.dart 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. import 'package:get/get.dart';
  2. ///
  3. /// 原生应用枚举
  4. /// 当前app已经存在的是应用
  5. ///
  6. enum O2NativeAppEnum {
  7. task,
  8. taskcompleted,
  9. read,
  10. readcompleted,
  11. meeting,
  12. yunpan,
  13. bbs,
  14. cms,
  15. attendance,
  16. attendanceOld,
  17. calendar,
  18. mindMap,
  19. }
  20. extension O2NativeAppEnumExtension on O2NativeAppEnum {
  21. String get name {
  22. switch (this) {
  23. case O2NativeAppEnum.task:
  24. return "app_name_task".tr;
  25. case O2NativeAppEnum.taskcompleted:
  26. return "app_name_taskcompleted".tr;
  27. case O2NativeAppEnum.read:
  28. return "app_name_read".tr;
  29. case O2NativeAppEnum.readcompleted:
  30. return "app_name_readcompleted".tr;
  31. case O2NativeAppEnum.bbs:
  32. return "app_name_bbs".tr;
  33. case O2NativeAppEnum.calendar:
  34. return "app_name_calendar".tr;
  35. case O2NativeAppEnum.cms:
  36. return "app_name_cms".tr;
  37. case O2NativeAppEnum.meeting:
  38. return "app_name_meeting".tr;
  39. case O2NativeAppEnum.mindMap:
  40. return "app_name_mindMap".tr;
  41. case O2NativeAppEnum.attendance:
  42. return "app_name_attendance".tr;
  43. case O2NativeAppEnum.attendanceOld:
  44. return "app_name_attendance_old".tr;
  45. case O2NativeAppEnum.yunpan:
  46. return "app_name_yunpan".tr;
  47. }
  48. }
  49. String get key {
  50. switch (this) {
  51. case O2NativeAppEnum.task:
  52. return "task";
  53. case O2NativeAppEnum.taskcompleted:
  54. return "taskcompleted";
  55. case O2NativeAppEnum.read:
  56. return "read";
  57. case O2NativeAppEnum.readcompleted:
  58. return "readcompleted";
  59. case O2NativeAppEnum.bbs:
  60. return "bbs";
  61. case O2NativeAppEnum.calendar:
  62. return "calendar";
  63. case O2NativeAppEnum.cms:
  64. return "cms";
  65. case O2NativeAppEnum.meeting:
  66. return "meeting";
  67. case O2NativeAppEnum.mindMap:
  68. return "mindMap";
  69. case O2NativeAppEnum.attendance:
  70. return "attendance";
  71. case O2NativeAppEnum.attendanceOld:
  72. return "attendanceOld";
  73. case O2NativeAppEnum.yunpan:
  74. return "yunpan";
  75. }
  76. }
  77. // 应用图标地址
  78. String get assetPath {
  79. switch (this) {
  80. case O2NativeAppEnum.task:
  81. return "app_task.png";
  82. case O2NativeAppEnum.taskcompleted:
  83. return "app_task_completed.png";
  84. case O2NativeAppEnum.read:
  85. return "app_read.png";
  86. case O2NativeAppEnum.readcompleted:
  87. return "app_read_completed.png";
  88. case O2NativeAppEnum.meeting:
  89. return "app_meeting.png";
  90. case O2NativeAppEnum.bbs:
  91. return "app_bbs.png";
  92. case O2NativeAppEnum.yunpan:
  93. return "app_yunpan.png";
  94. case O2NativeAppEnum.attendance:
  95. return "app_attendance.png";
  96. case O2NativeAppEnum.attendanceOld:
  97. return "app_attendance.png";
  98. case O2NativeAppEnum.cms:
  99. return "app_cms.png";
  100. case O2NativeAppEnum.calendar:
  101. return "app_calendar.png";
  102. case O2NativeAppEnum.mindMap:
  103. return "app_mind_map.png";
  104. }
  105. }
  106. }