main_state.dart 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. import 'package:cpt_main/modules/feedback/page/feedback_page.dart';
  2. import 'package:cs_resources/generated/assets.dart';
  3. import 'package:cs_resources/generated/l10n.dart';
  4. import 'package:flutter/material.dart';
  5. import 'package:widgets/ext/ex_widget.dart';
  6. import 'package:widgets/my_load_image.dart';
  7. class MainState {
  8. //底部数据Map
  9. final Map bottomMap = {
  10. S.current.home: [
  11. const MyAssetImage(
  12. //默认
  13. Assets.mainTabHomeUnselected,
  14. width: 20,
  15. height: 20,
  16. ).marginOnly(bottom: 4),
  17. const MyAssetImage(
  18. Assets.mainTabHomeSelected,
  19. width: 20,
  20. height: 20,
  21. ).marginOnly(bottom: 4),
  22. const MyAssetImage(
  23. //暗色
  24. Assets.mainTabHomeSelected,
  25. width: 20,
  26. height: 20,
  27. color: Colors.white,
  28. ).marginOnly(bottom: 4)
  29. ],
  30. S.current.visitor: [
  31. const MyAssetImage(
  32. Assets.mainTabVisitorUnselected,
  33. width: 20,
  34. height: 20,
  35. ).marginOnly(bottom: 4),
  36. const MyAssetImage(
  37. Assets.mainTabVisitorSelected,
  38. width: 20,
  39. height: 20,
  40. ).marginOnly(bottom: 4),
  41. const MyAssetImage(
  42. Assets.mainTabVisitorSelected,
  43. width: 20,
  44. height: 20,
  45. color: Colors.white,
  46. ).marginOnly(bottom: 4)
  47. ],
  48. S.current.feedback: [
  49. const MyAssetImage(
  50. Assets.mainTabFeedbackUnselected,
  51. width: 20,
  52. height: 20,
  53. ).marginOnly(bottom: 4),
  54. const MyAssetImage(
  55. Assets.mainTabFeedbackSelected,
  56. width: 20,
  57. height: 20,
  58. ).marginOnly(bottom: 4),
  59. const MyAssetImage(
  60. Assets.mainTabFeedbackSelected,
  61. width: 20,
  62. height: 20,
  63. color: Colors.white,
  64. ).marginOnly(bottom: 4)
  65. ],
  66. S.current.me: [
  67. const MyAssetImage(
  68. Assets.mainTabMeUnselected,
  69. width: 20,
  70. height: 20,
  71. ).marginOnly(bottom: 4),
  72. const MyAssetImage(
  73. Assets.mainTabMeSelected,
  74. width: 20,
  75. height: 20,
  76. ).marginOnly(bottom: 4),
  77. const MyAssetImage(
  78. Assets.mainTabMeSelected,
  79. width: 20,
  80. height: 20,
  81. color: Colors.white,
  82. ).marginOnly(bottom: 4),
  83. ],
  84. };
  85. }