5 Commity b125014f5a ... 23761d8e0b

Autor SHA1 Wiadomość Data
  liukai 23761d8e0b 部分模块的暗色模式适配 1 tydzień temu
  liukai e7c502108e 现有的模块基本抽取国际化文本的key出来。大致已完成 3 tygodni temu
  liukai 313fc32d36 Merge remote-tracking branch 'origin/dev_services' into dev_services 1 miesiąc temu
  liukai bed73b9e86 指定的错误,页面显示修复 1 miesiąc temu
  “shanwenxin” b10f3a5d83 处理bug 1 miesiąc temu
100 zmienionych plików z 1426 dodań i 1958 usunięć
  1. 3 2
      app/lib/main.dart
  2. 64 63
      packages/cpt_community/lib/components/garage_card.dart
  3. 46 44
      packages/cpt_community/lib/components/newsfeed_card_footer.dart
  4. 3 2
      packages/cpt_community/lib/modules/community/community_page.dart
  5. 29 27
      packages/cpt_community/lib/modules/community/community_state.dart
  6. 8 35
      packages/cpt_community/lib/modules/community/community_vm.dart
  7. 2 1
      packages/cpt_community/lib/modules/community/following/following_page.dart
  8. 2 1
      packages/cpt_community/lib/modules/community/foryou/foryou_page.dart
  9. 2 1
      packages/cpt_community/lib/modules/community/news/news_page.dart
  10. 6 7
      packages/cpt_community/lib/modules/community/newsfeed_detail/newsfeed_detail_page.dart
  11. 2 1
      packages/cpt_community/lib/modules/community/newsfeed_detail/newsfeed_detail_state.dart
  12. 3 2
      packages/cpt_community/lib/modules/community/newsfeed_detail/newsfeed_detail_vm.dart
  13. 2 2
      packages/cpt_community/lib/modules/community/newsfeed_post/newsfeed_post_page.dart
  14. 2 1
      packages/cpt_community/lib/modules/community/newsfeed_post/newsfeed_post_vm.dart
  15. 3 2
      packages/cpt_community/lib/modules/garage/garagesale_detail/garagesale_detail_page.dart
  16. 2 1
      packages/cpt_community/lib/modules/garage/garagesale_detail/garagesale_detail_vm.dart
  17. 7 7
      packages/cpt_community/lib/modules/garage/garagesale_post/garagesale_post_page.dart
  18. 1 0
      packages/cpt_community/lib/modules/garage/garagesale_post/garagesale_post_state.dart
  19. 2 1
      packages/cpt_community/lib/modules/my_following/components/item_following.dart
  20. 2 1
      packages/cpt_community/lib/modules/my_following/my_follow/my_follow_page.dart
  21. 2 1
      packages/cpt_community/lib/modules/my_following/my_follower/my_follower_page.dart
  22. 3 2
      packages/cpt_community/lib/modules/my_following/my_following_page.dart
  23. 1 1
      packages/cpt_community/lib/modules/my_following/my_following_tabs.dart
  24. 4 2
      packages/cpt_community/lib/modules/my_following/tabs_data.dart
  25. 2 1
      packages/cpt_community/lib/modules/my_posts/my_posts_page.dart
  26. 4 3
      packages/cpt_community/lib/modules/my_posts/my_posts_vm.dart
  27. 1 1
      packages/cpt_facility/lib/modules/book_confirm/book_confirm_page.dart
  28. 1 1
      packages/cpt_facility/lib/modules/detail/facility_detail_page.dart
  29. 2 2
      packages/cpt_main/lib/modules/feedback/detail/feedback_detail_page.dart
  30. 1 1
      packages/cpt_main/lib/modules/feedback/item_feedback.dart
  31. 18 3
      packages/cpt_main/lib/modules/home/home_page.dart
  32. 1 1
      packages/cpt_main/lib/modules/home/latest_news/item_latest_news.dart
  33. 1 1
      packages/cpt_main/lib/modules/home/management_guides/item_management_guide.dart
  34. 1 1
      packages/cpt_main/lib/modules/home/property_news/item_list_news.dart
  35. 1 1
      packages/cpt_main/lib/modules/visitor/item_visitor.dart
  36. 35 44
      packages/cpt_notice_board/lib/modules/announ/page/announ_page.dart
  37. 8 8
      packages/cpt_notice_board/lib/modules/announcement_detail/page/announcement_detail_page.dart
  38. 24 23
      packages/cpt_notice_board/lib/modules/documents/page/documents_page.dart
  39. 15 14
      packages/cpt_notice_board/lib/modules/documents_list/page/documents_list_page.dart
  40. 10 8
      packages/cpt_notice_board/lib/modules/event/page/event_page.dart
  41. 20 16
      packages/cpt_notice_board/lib/modules/event_detail/page/event_detail_page.dart
  42. 8 11
      packages/cpt_notice_board/lib/modules/notice_board/page/notice_board_page.dart
  43. 4 3
      packages/cpt_notice_board/lib/modules/notice_board/vm/notice_board_view_model.dart
  44. 1 1
      packages/cpt_notice_board/lib/router/page/notice_board_page_router.dart
  45. 2 5
      packages/cpt_payment/lib/modules/choose_card/choose_card_page.dart
  46. 2 1
      packages/cpt_payment/lib/modules/choose_card/choose_card_view_model.dart
  47. 65 0
      packages/cpt_payment/lib/modules/choose_card/item_card.dart
  48. 1 1
      packages/cpt_payment/lib/modules/payment/history/item_history_list.dart
  49. 2 2
      packages/cpt_payment/lib/modules/payment/info/info_screen.dart
  50. 1 1
      packages/cpt_payment/lib/modules/payment/manage/item_manage.dart
  51. 2 1
      packages/cpt_payment/lib/modules/payment/manage/manage_view_model.dart
  52. 1 1
      packages/cpt_payment/lib/modules/payment/payment/item_payment_list.dart
  53. 2 1
      packages/cpt_profile/lib/modules/setting/setting_view_model.dart
  54. 14 14
      packages/cpt_property/lib/modules/ioan/property_ioan_page.dart
  55. 32 72
      packages/cpt_property/lib/modules/ioan/property_ioan_vm.dart
  56. 1 1
      packages/cpt_property/lib/modules/news/page/property_news_page.dart
  57. 2 2
      packages/cpt_property/lib/modules/news_detail/property_news_detail_page.dart
  58. 2 1
      packages/cpt_property/lib/modules/property/page/property_page.dart
  59. 5 4
      packages/cpt_property/lib/modules/property/page/property_page_state.dart
  60. 2 1
      packages/cpt_property/lib/modules/rent/page/property_rent_page.dart
  61. 229 373
      packages/cpt_rewards/lib/modules/rewards/rewards_page.dart
  62. 1 1
      packages/cpt_rewards/lib/modules/rewards/rewards_repository.dart
  63. 5 3
      packages/cpt_rewards/lib/modules/rewards/rewards_state.dart
  64. 8 15
      packages/cpt_rewards/lib/modules/rewards/rewards_vm.dart
  65. 14 24
      packages/cpt_rewards/lib/modules/rewards_address/rewards_address_page.dart
  66. 22 25
      packages/cpt_rewards/lib/modules/rewards_code/rewards_code_page.dart
  67. 3 3
      packages/cpt_rewards/lib/modules/rewards_confirm/dialog/account_deactivation_dialog.dart
  68. 50 80
      packages/cpt_rewards/lib/modules/rewards_confirm/rewards_confirm_page.dart
  69. 60 128
      packages/cpt_rewards/lib/modules/rewards_detail/rewards_detail_page.dart
  70. 9 6
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_earned/rewards_history_earned_page.dart
  71. 10 17
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_page.dart
  72. 8 6
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_spent/rewards_history_spent_page.dart
  73. 3 2
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_vm.dart
  74. 114 161
      packages/cpt_rewards/lib/modules/rewards_home/rewards_home_page.dart
  75. 40 116
      packages/cpt_rewards/lib/modules/rewards_list/rewards_list_page.dart
  76. 23 45
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_active/rewards_my_active_page.dart
  77. 18 33
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_expired/rewards_my_expired_page.dart
  78. 9 20
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_page.dart
  79. 23 44
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_used/rewards_my_used_page.dart
  80. 4 3
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_vm.dart
  81. 41 39
      packages/cpt_rewards/lib/modules/rewards_redeem/rewards_redeem_page.dart
  82. 66 107
      packages/cpt_rewards/lib/modules/rewards_search/rewards_search_page.dart
  83. 38 36
      packages/cpt_rewards/lib/modules/rewards_successful/rewards_successful_page.dart
  84. 57 129
      packages/cpt_rewards/lib/modules/rewards_transaction/rewards_transaction_page.dart
  85. 2 1
      packages/cpt_services/lib/components/chooseAirConditionTitle.dart
  86. 18 20
      packages/cpt_services/lib/components/chooseHouseCleanContent.dart
  87. 2 1
      packages/cpt_services/lib/components/chooseHouseCleanTitle.dart
  88. 2 1
      packages/cpt_services/lib/components/chooseVisitTimeBottomFooter.dart
  89. 4 3
      packages/cpt_services/lib/components/chooseVisitTimeContent.dart
  90. 2 1
      packages/cpt_services/lib/components/chooseVisitTimeTitle.dart
  91. 4 3
      packages/cpt_services/lib/components/status_card_item.dart
  92. 14 12
      packages/cpt_services/lib/constants_services.dart
  93. 7 23
      packages/cpt_services/lib/modules/services/clean_order_cancel_success/clean_order_cancel_success_page.dart
  94. 4 3
      packages/cpt_services/lib/modules/services/clean_order_detail/cancelOrderDialogContent.dart
  95. 8 8
      packages/cpt_services/lib/modules/services/clean_order_detail/clean_order_detail_page.dart
  96. 4 3
      packages/cpt_services/lib/modules/services/clean_order_detail/clean_order_detail_vm.dart
  97. 3 2
      packages/cpt_services/lib/modules/services/homeService/home_service_page.dart
  98. 1 1
      packages/cpt_services/lib/modules/services/inProgress/in_progress_page.dart
  99. 1 1
      packages/cpt_services/lib/modules/services/repair/repair_page.dart
  100. 0 0
      packages/cpt_services/lib/modules/services/repair/repair_state.dart

+ 3 - 2
app/lib/main.dart

@@ -56,8 +56,8 @@ void main() async {
     ..addServiceProvider(servicesServiceProvider)
     ..addServiceProvider(profileServiceProvider);
 
-  runApp(ProviderScope(
-    parent: globalContainer,
+  runApp(UncontrolledProviderScope(
+    container: globalContainer,
     child: MyApp(),
   ));
 }
@@ -143,6 +143,7 @@ class MyApp extends HookConsumerWidget {
       });
       return () {
         // 组件卸载时执行
+        globalContainer.dispose();
       };
     }, []);
 

+ 64 - 63
packages/cpt_community/lib/components/garage_card.dart

@@ -24,7 +24,6 @@ import '../modules/garage/for_sale/for_sale_vm.dart';
 // 'publish_time': 'June 17,2016 at 7:23 p.m.',
 // 'publisher_avator': Assets.communityCamera,'
 
-
 // 定义一个 使用场景的 枚举
 enum GarageCardUseType {
   // 默认
@@ -33,6 +32,7 @@ enum GarageCardUseType {
   myPostsForSale,
   myPostsForRent,
 }
+
 class GarageCard extends StatelessWidget {
   GarageCardUseType? useType;
   Map<String, dynamic> itemObj;
@@ -53,19 +53,18 @@ class GarageCard extends StatelessWidget {
 
   @override
   Widget build(BuildContext context) {
-    List? card_resources = itemObj.getValue<List>("resources", [])?? [];
-    String card_img = card_resources.length>0? card_resources[0]:"";
+    List? card_resources = itemObj.getValue<List>("resources", []) ?? [];
+    String card_img = card_resources.length > 0 ? card_resources[0] : "";
     String card_title = itemObj.getValue("title", "");
     int card_price = itemObj.getValue("price", "");
     String card_created_at = itemObj.getValue("created_at", "");
-    Map<String, dynamic>? card_account = itemObj.getValue<Map<String,dynamic>>("account", null);
-    String card_avatar = card_account?['avatar']?? "";
-    String card_publish_name = card_account?['name']?? "";
+    Map<String, dynamic>? card_account = itemObj.getValue<Map<String, dynamic>>("account", null);
+    String card_avatar = card_account?['avatar'] ?? "";
+    String card_publish_name = card_account?['name'] ?? "";
     bool card_liked = itemObj.getValue("liked", false);
     int card_likes_count = itemObj.getValue("likes_count", 0);
-    return SizedBox(
-      height: cardHeight!,
-      child: Column(
+    return Column(
+        mainAxisSize: MainAxisSize.max,
         children: [
           // 图片
           Row(
@@ -74,7 +73,10 @@ class GarageCard extends StatelessWidget {
             children: [
               Expanded(
                 child: ClipRRect(
-                  borderRadius: const BorderRadius.only(topLeft: Radius.circular(8), topRight: Radius.circular(8),),
+                  borderRadius: const BorderRadius.only(
+                    topLeft: Radius.circular(8),
+                    topRight: Radius.circular(8),
+                  ),
                   child: MyLoadImage(
                     card_img,
                     width: 166.5,
@@ -86,9 +88,10 @@ class GarageCard extends StatelessWidget {
               ),
             ],
           ),
+
           // 标题
           Padding(
-            padding: const EdgeInsets.only(left: 10, right: 10, top: 10, bottom: 10),
+            padding: const EdgeInsets.only(left: 10, right: 10, top: 10, bottom: 5),
             child: Row(
               mainAxisAlignment: MainAxisAlignment.center,
               children: [
@@ -106,9 +109,10 @@ class GarageCard extends StatelessWidget {
               ],
             ),
           ),
+
           // 价格 及 收藏
           Padding(
-            padding: const EdgeInsets.only(left: 10, right: 10,top: 0, bottom: 0),
+            padding: const EdgeInsets.only(left: 10, right: 10, top: 0, bottom: 0),
             child: Row(
               mainAxisAlignment: MainAxisAlignment.spaceAround,
               crossAxisAlignment: CrossAxisAlignment.center,
@@ -126,21 +130,23 @@ class GarageCard extends StatelessWidget {
                 ),
                 // 动态的 收藏数
                 CollectionWidget(
-                    collectionNum: card_likes_count,
-                    isCollection: card_liked,
-                    onClickColleciotn: onClickColleciotn,
+                  collectionNum: card_likes_count,
+                  isCollection: card_liked,
+                  onClickColleciotn: onClickColleciotn,
                 ),
               ],
             ),
           ),
+
           // 发布人信息
           Expanded(
             child: Padding(
-              padding: EdgeInsets.only(left: (useType == GarageCardUseType.forSale || useType == GarageCardUseType.forRent)?10:0, right: 10, bottom: 10.5),
-              child: Row(
-                mainAxisAlignment: MainAxisAlignment.spaceAround,
-                crossAxisAlignment: CrossAxisAlignment.center,
-                children: [
+                padding: EdgeInsets.only(
+                  left: (useType == GarageCardUseType.forSale || useType == GarageCardUseType.forRent) ? 10 : 0,
+                  right: 10,
+                  bottom: (useType == GarageCardUseType.forSale || useType == GarageCardUseType.forRent) ? 10.5 :0,
+                ),
+                child: Row(mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.center, children: [
                   if (useType == GarageCardUseType.forSale || useType == GarageCardUseType.forRent)
                     MyLoadImage(
                       card_avatar,
@@ -151,11 +157,11 @@ class GarageCard extends StatelessWidget {
                   else
                     const SizedBox.shrink(),
                   Expanded(
-                    child: Column(
-                      mainAxisAlignment: MainAxisAlignment.center,
-                      crossAxisAlignment: CrossAxisAlignment.start,
-                      mainAxisSize: MainAxisSize.min,
-                      children: [
+                      child: Column(
+                          mainAxisAlignment: MainAxisAlignment.center,
+                          crossAxisAlignment: CrossAxisAlignment.start,
+                          mainAxisSize: MainAxisSize.min,
+                          children: [
                         if (useType == GarageCardUseType.forSale || useType == GarageCardUseType.forRent)
                           MyTextView(
                             card_publish_name,
@@ -175,51 +181,46 @@ class GarageCard extends StatelessWidget {
                           isTextEllipsis: true,
                           textAlign: TextAlign.start,
                           marginLeft: 13,
-                          marginTop: 5,
+                          marginTop: 2.5,
+                          marginBottom: 2.5,
                           fontSize: 10,
                           textColor: context.appColors.textBlack,
                           isFontRegular: true,
                         ),
-                      ]
-                    )
-                  ),
-                ]
-              )
-            ),
+                      ])),
+                ])),
           )
         ],
-      ),
-    );
+      ).constrained(height: cardHeight);
+
   }
 }
 
-
-
 class CollectionWidget extends HookConsumerWidget {
   int collectionNum = 0;
   bool isCollection = false;
   final Function(dynamic)? onClickColleciotn;
+
   CollectionWidget({
     Key? key,
     required this.collectionNum,
     required this.isCollection,
     this.onClickColleciotn,
   }) : super(key: key);
+
   @override
   Widget build(BuildContext context, WidgetRef ref) {
     final collectionNumState = useState(collectionNum);
     final isCollectionState = useState(isCollection);
     return Container(
-      width: 60,
-      height: 30,
-      alignment: Alignment.center,
-      // decoration: BoxDecoration(
-      //   color: ColorUtils.string2Color('#E5E5E5'),
-      //   borderRadius: BorderRadius.circular(15),
-      // ),
-      child: Row(
-        mainAxisAlignment: MainAxisAlignment.center,
-        children: [
+        width: 60,
+        height: 30,
+        alignment: Alignment.center,
+        // decoration: BoxDecoration(
+        //   color: ColorUtils.string2Color('#E5E5E5'),
+        //   borderRadius: BorderRadius.circular(15),
+        // ),
+        child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
           MyTextView(
             '${collectionNumState.value}',
             textColor: context.appColors.textBlack,
@@ -228,26 +229,26 @@ class CollectionWidget extends HookConsumerWidget {
             marginRight: 7,
           ),
           MyLoadImage(
-            isCollectionState.value? Assets.communityLikeActive: Assets.communityLike,
+            isCollectionState.value ? Assets.communityLikeActive : Assets.communityLike,
             width: 14.1,
             height: 14,
           )
         ]
-        // 点击 收餐/取消收藏
-    ).onTap(() async{
-        // Log.d("点击了收藏按钮  ${isCollectionState.value}");
-        // ToastEngine.show("点击了收藏按钮 ${isCollectionState.value}");
-        final result = await onClickColleciotn?.call(isCollectionState.value);
-        if(result !=null && result){
-          isCollectionState.value = !isCollectionState.value;
-          collectionNumState.value = (collectionNumState.value + (isCollectionState.value? 1: -1))<0? 0: (collectionNumState.value + (isCollectionState.value? 1: -1));
-          if(isCollectionState.value){
-            // ToastEngine.show("Collect Success");
-          }else {
-            // ToastEngine.show("Cancel Collect Success");
+            // 点击 收餐/取消收藏
+            ).onTap(() async {
+          // Log.d("点击了收藏按钮  ${isCollectionState.value}");
+          // ToastEngine.show("点击了收藏按钮 ${isCollectionState.value}");
+          final result = await onClickColleciotn?.call(isCollectionState.value);
+          if (result != null && result) {
+            isCollectionState.value = !isCollectionState.value;
+            collectionNumState.value =
+                (collectionNumState.value + (isCollectionState.value ? 1 : -1)) < 0 ? 0 : (collectionNumState.value + (isCollectionState.value ? 1 : -1));
+            if (isCollectionState.value) {
+              // ToastEngine.show("Collect Success");
+            } else {
+              // ToastEngine.show("Cancel Collect Success");
+            }
           }
-        }
-      })
-    );
+        }));
   }
-}
+}

+ 46 - 44
packages/cpt_community/lib/components/newsfeed_card_footer.dart

@@ -1,5 +1,6 @@
 import 'package:cpt_community/components/newfeed_card_header.dart';
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/widgets.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
@@ -11,7 +12,6 @@ import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_like_button.dart';
 
-
 import '../modules/community/community_page.dart';
 
 // 'id':1,
@@ -35,7 +35,7 @@ class NewsFeedCardFooter extends HookConsumerWidget {
 
   NewsFeedCardFooter({
     Key? key,
-     GlobalKey<MyLikeButtonState>? likeButtonKey,
+    GlobalKey<MyLikeButtonState>? likeButtonKey,
     required this.isLike,
     this.onLike,
     this.likes_count = 0,
@@ -43,24 +43,20 @@ class NewsFeedCardFooter extends HookConsumerWidget {
     this.onComment,
     this.onShare,
     this.showShare = false,
-  })
-  : likeButtonKey = likeButtonKey ?? GlobalKey<MyLikeButtonState>(),
-         super(key: key);
+  })  : likeButtonKey = likeButtonKey ?? GlobalKey<MyLikeButtonState>(),
+        super(key: key);
 
   @override
   Widget build(BuildContext context, WidgetRef ref) {
-    final _isLike =useState(isLike);
-    final _likes_count =useState(likes_count);
-    final _comments_count =useState(comments_count);
+    final _isLike = useState(isLike);
+    final _likes_count = useState(likes_count);
+    final _comments_count = useState(comments_count);
 
     return Container(
-      height: 40,
-      width: double.infinity,
-      // padding: const EdgeInsets.symmetric(horizontal: 16),
-      child: Row(
-        mainAxisAlignment: MainAxisAlignment.spaceBetween,
-        crossAxisAlignment: CrossAxisAlignment.center,
-        children: [
+        height: 40,
+        width: double.infinity,
+        // padding: const EdgeInsets.symmetric(horizontal: 16),
+        child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [
           Expanded(
             child: Container(
               padding: const EdgeInsets.all(10),
@@ -78,7 +74,7 @@ class NewsFeedCardFooter extends HookConsumerWidget {
                   ),
                   // 动态的
                   MyTextView(
-                    'Like (${_likes_count.value})',
+                    S.current.like_count(_likes_count.value?.toString() ?? "0"),
                     textColor: ColorUtils.string2Color('#767676'),
                     fontSize: 14,
                     isFontRegular: true,
@@ -87,7 +83,7 @@ class NewsFeedCardFooter extends HookConsumerWidget {
                   )
                 ],
               ),
-            ).onTap((){
+            ).onTap(() {
               final state = likeButtonKey.currentState;
               state?.triggerTap();
             }),
@@ -98,9 +94,13 @@ class NewsFeedCardFooter extends HookConsumerWidget {
               child: Row(
                 mainAxisAlignment: MainAxisAlignment.center,
                 children: [
-                  const MyAssetImage(Assets.communityComments, width: 16,height: 16,),
+                  const MyAssetImage(
+                    Assets.communityComments,
+                    width: 16,
+                    height: 16,
+                  ),
                   MyTextView(
-                    'Comments ($comments_count)',
+                    S.current.comment_count(comments_count?.toString() ?? "0"),
                     textColor: ColorUtils.string2Color('#767676'),
                     fontSize: 14,
                     isFontRegular: true,
@@ -109,37 +109,39 @@ class NewsFeedCardFooter extends HookConsumerWidget {
                   ),
                 ],
               ),
-            ).onTap((){
+            ).onTap(() {
               // Log.d("点击了comments   ${tabsRouterKey.currentState?.controller?.activeIndex}");
               // tabsRouterKey.currentState?.controller?.setActiveIndex(2);
               onComment?.call();
             }),
           ),
-          if(showShare)
+          if (showShare)
             Expanded(
               child: Container(
-              padding: const EdgeInsets.all(8),
-              child: Row(
-                mainAxisAlignment: MainAxisAlignment.center,
-                children: [
-                  const MyAssetImage(Assets.communityShare, width: 16,height: 16,),
-                  MyTextView(
-                    'Share',
-                    textColor: ColorUtils.string2Color('#767676'),
-                    fontSize: 14,
-                    isFontRegular: true,
-                    textAlign: TextAlign.left,
-                    marginLeft: 8,
-                  ),
-                ],
-              ),
-                        ).onTap((){
-              Log.d("点击了share");
-              onShare?.call();
-                        }),
+                padding: const EdgeInsets.all(8),
+                child: Row(
+                  mainAxisAlignment: MainAxisAlignment.center,
+                  children: [
+                    const MyAssetImage(
+                      Assets.communityShare,
+                      width: 16,
+                      height: 16,
+                    ),
+                    MyTextView(
+                      S.current.share,
+                      textColor: ColorUtils.string2Color('#767676'),
+                      fontSize: 14,
+                      isFontRegular: true,
+                      textAlign: TextAlign.left,
+                      marginLeft: 8,
+                    ),
+                  ],
+                ),
+              ).onTap(() {
+                Log.d("点击了share");
+                onShare?.call();
+              }),
             ),
-        ]
-      )
-    );
+        ]));
   }
-}
+}

+ 3 - 2
packages/cpt_community/lib/modules/community/community_page.dart

@@ -1,5 +1,6 @@
 
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter/rendering.dart';
@@ -324,7 +325,7 @@ class CommunityPage extends HookConsumerWidget with WidgetsBindingObserver {
               ),
               Expanded(
                 child: MyTextView(
-                  "What’s on your mind?",
+                  S.current.what_on_your_mind,
                   textColor: context.appColors.textBlack,
                   fontSize: 15,
                   marginLeft: 15,
@@ -365,7 +366,7 @@ class CommunityPage extends HookConsumerWidget with WidgetsBindingObserver {
               ),
               Expanded(
                 child: MyTextView(
-                  "Sell Item",
+                  S.current.sell_item,
                   textColor: context.appColors.textBlack,
                   fontSize: 15,
                   marginLeft: 15,

+ 29 - 27
packages/cpt_community/lib/modules/community/community_state.dart

@@ -1,20 +1,19 @@
 import 'package:cpt_community/modules/community/community_page.dart';
 import 'package:cs_resources/generated/assets.dart';
-
+import 'package:cs_resources/generated/l10n.dart';
 
 class CommunityVmState {
   List<Map<String, dynamic>>? topSectionsData;
   List<String>? newsFeedTabsList;
   List<String>? garageSaleTabsList;
   List<Map<String, dynamic>>? garageCategoryList = []; // garageCategoryList
-  int currentCategoryIdx = 0;   // 0: news feed, 1: garage sale
+  int currentCategoryIdx = 0; // 0: news feed, 1: garage sale
   int currentPageViewIdx = 0;
   int lastNewsfeedTabIdx = 0; // 上一次newsfeed 的 tabIdx
   int lastGarageTabIdx = 0; // 上一次garagesale 的 tabIdx
   dynamic? tabsRouter;
   dynamic? pageController;
 
-
   CommunityVmState({
     List<Map<String, dynamic>>? topSectionsData,
     required this.currentPageViewIdx,
@@ -26,29 +25,32 @@ class CommunityVmState {
     List<Map<String, dynamic>>? garageCategoryList,
     this.tabsRouter,
     this.pageController,
-  }) : topSectionsData = topSectionsData?? [
-    {
-      "title": "News Feed",
-      "icon": Assets.communityNews,
-    },
-    {
-      "title": "Garage Sale",
-      "icon": Assets.communityGarageSale,
-    },
-  ],
-        currentCategoryIdx = currentCategoryIdx?? 0,
-        lastGarageTabIdx = lastGarageTabIdx?? 0,
-        lastNewsfeedTabIdx = lastNewsfeedTabIdx?? 0,
-  newsFeedTabsList = newsFeedTabsList?? [
-    "News",
-    "Following",
-
-    "For You",
-  ],
-  garageSaleTabsList = garageSaleTabsList?? [
-    "For Sale",
-    "For Rent",
-  ], garageCategoryList = garageCategoryList?? [];
+  })  : topSectionsData = topSectionsData ??
+            [
+              {
+                "title": S.current.news_feed,
+                "icon": Assets.communityNews,
+              },
+              {
+                "title": S.current.garage_sale,
+                "icon": Assets.communityGarageSale,
+              },
+            ],
+        currentCategoryIdx = currentCategoryIdx ?? 0,
+        lastGarageTabIdx = lastGarageTabIdx ?? 0,
+        lastNewsfeedTabIdx = lastNewsfeedTabIdx ?? 0,
+        newsFeedTabsList = newsFeedTabsList ??
+            [
+              S.current.newsfeed_news,
+              S.current.newsfeed_following,
+              S.current.for_you,
+            ],
+        garageSaleTabsList = garageSaleTabsList ??
+            [
+              S.current.for_sale,
+              S.current.for_rent,
+            ],
+        garageCategoryList = garageCategoryList ?? [];
 
   CommunityVmState copyWith({
     List<Map<String, dynamic>>? topSectionsData,
@@ -75,4 +77,4 @@ class CommunityVmState {
       pageController: pageController ?? this.pageController,
     );
   }
-}
+}

+ 8 - 35
packages/cpt_community/lib/modules/community/community_vm.dart

@@ -6,6 +6,7 @@ import 'package:cpt_community/respository/common_garage.dart';
 import 'package:cpt_community/respository/common_newsfeed.dart';
 import 'package:cpt_community/router/page/community_page_router.dart';
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
@@ -55,13 +56,13 @@ class CommunityVm extends _$CommunityVm {
 
   CommunityVmState initState() {
     List<String> newsFeedTabsList = [
-      "News",
-      "Following",
-      "For You",
+      S.current.newsfeed_news,
+      S.current.newsfeed_following,
+      S.current.for_you,
     ];
     List<String> garageSaleTabsList = [
-      "For Sale",
-      "For Rent",
+      S.current.for_sale,
+      S.current.for_rent,
     ];
 
     List<String> COMMUNITY_TABS_LIST = [...newsFeedTabsList];
@@ -211,34 +212,6 @@ class CommunityVm extends _$CommunityVm {
   // 获取garage sale 分类选项
   Future<List<Map<String, dynamic>>> getGarageSaleCategoryOptions() async{
     List<Map<String, dynamic>> garageCategoryList = [
-      // {
-      //   'id': '1',
-      //   'name': 'Kids',
-      // },
-      // {
-      //   'id': '2',
-      //   'name': 'Homeware',
-      // },
-      // {
-      //   'id': '3',
-      //   'name': 'Fashion',
-      // },
-      // {
-      //   'id': '4',
-      //   'name': 'Electronics',
-      // },
-      // {
-      //   'id': '5',
-      //   'name': 'Sports',
-      // },
-      // {
-      //   'id': '6',
-      //   'name': 'Furniture',
-      // },
-      // {
-      //   'id': '7',
-      //   'name': 'Others',
-      // },
     ];
     // 获取分类列表
     try {
@@ -287,12 +260,12 @@ class CommunityVm extends _$CommunityVm {
         position: DialogPosition.center,
         widget: AppCustomDialog(
           message: '',
-          title: 'Choose a Category',
+          title: S.current.choose_category,
           dialogWidth: MediaQuery.of(context).size.width * 0.8,
           // contentBoxMaxHeight: 350,
           // contentBoxMinHeight: 300,
           isShowConfirmBtn: garageCategoryList!.length > 0 ? true: false,
-          confirmTxt: "Ok",
+          confirmTxt: S.current.confirm,
           messageBuilder: (BuildContext context){
             return Container(
               color: context.appColors.textWhite,

+ 2 - 1
packages/cpt_community/lib/modules/community/following/following_page.dart

@@ -1,3 +1,4 @@
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter/rendering.dart';
@@ -181,7 +182,7 @@ class FollowingPage extends HookConsumerWidget {
                   //   borderRadius: BorderRadius.circular(5),
                   // ),
                   child: MyButton(
-                    text: '+Follow',
+                    text: S.current.to_follow,
                     textColor: Colors.white,
                     backgroundColor: ColorUtils.string2Color('#4161D0'),
                     radius: 8,

+ 2 - 1
packages/cpt_community/lib/modules/community/foryou/foryou_page.dart

@@ -1,3 +1,4 @@
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter/rendering.dart';
@@ -188,7 +189,7 @@ class ForyouPage extends HookConsumerWidget {
                   //   borderRadius: BorderRadius.circular(5),
                   // ),
                   child: MyButton(
-                    text: '+Follow',
+                    text: S.current.to_follow,
                     textColor: Colors.white,
                     backgroundColor: ColorUtils.string2Color('#4161D0'),
                     radius: 8,

+ 2 - 1
packages/cpt_community/lib/modules/community/news/news_page.dart

@@ -1,4 +1,5 @@
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:extended_nested_scroll_view/extended_nested_scroll_view.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
@@ -198,7 +199,7 @@ class NewsPage extends HookConsumerWidget {
                     builder: (context) {
                       final isFollowedState = useState<bool>(card_followed);
                       return MyButton(
-                        text: isFollowedState.value ? 'Followed': '+Follow',
+                        text: isFollowedState.value ? S.current.followed:S.current.to_follow,
                         textColor: isFollowedState.value ?  context.appColors.disEnableGray: context.appColors.textWhite,
                         disabledTextColor: context.appColors.disEnableGray,
                         backgroundColor: isFollowedState.value ? Colors.transparent : ColorUtils.string2Color('#4161D0'),

+ 6 - 7
packages/cpt_community/lib/modules/community/newsfeed_detail/newsfeed_detail_page.dart

@@ -1,5 +1,6 @@
 import 'package:cpt_community/router/page/community_page_router.dart';
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:domain/entity/newsfeed_detail_entity.dart';
 import 'package:flutter/material.dart';
@@ -66,7 +67,7 @@ class NewsfeedDetailPage extends HookConsumerWidget {
     return Scaffold(
       appBar: MyAppBar.appBar(
         context,
-        "News Feed Detail",
+        S.current.news_feed_detail,
         backgroundColor: context.appColors.backgroundWhite,
       ),
       backgroundColor: ColorUtils.string2Color("#F2F3F6"),
@@ -189,7 +190,7 @@ class NewsfeedDetailPage extends HookConsumerWidget {
                   builder: (context) {
                     final isFollowedState = useState<bool>(card_followed);
                     return MyButton(
-                      text: isFollowedState.value ? 'Followed': '+Follow',
+                      text: isFollowedState.value ?  S.current.followed:S.current.to_follow,
                       textColor: isFollowedState.value ?  context.appColors.disEnableGray: context.appColors.textWhite,
                       disabledTextColor: context.appColors.disEnableGray,
                       backgroundColor: isFollowedState.value ? Colors.transparent : ColorUtils.string2Color('#4161D0'),
@@ -251,9 +252,7 @@ class NewsfeedDetailPage extends HookConsumerWidget {
                       padding: const EdgeInsets.only(left: 15, right: 15,top: 14,bottom: 14),
                       child: Row(
                         children: [
-                          MyTextView('Comments', textColor: ColorUtils.string2Color("#2956B7"), fontSize: 15, isFontLight: true,),
-                          const SizedBox(width: 5,),
-                          MyTextView('(${commentCount})', textColor: ColorUtils.string2Color("#2956B7"), fontSize: 15, isFontLight: true,),
+                          MyTextView(S.current.comment_count(commentCount),  textColor: ColorUtils.string2Color("#2956B7"), fontSize: 15, isFontLight: true,),
                         ]
                       )
                     )
@@ -469,7 +468,7 @@ class NewsfeedDetailPage extends HookConsumerWidget {
                               const SizedBox(width: 10,),
 
                               MyTextView(
-                                "Like",
+                                S.current.like,
                                 textColor: context.appColors.whiteBG,
                                 fontSize: 14,
                                 isFontRegular: true,
@@ -500,7 +499,7 @@ class NewsfeedDetailPage extends HookConsumerWidget {
                               ),
                               const SizedBox(width: 10,),
                               MyTextView(
-                                "Comment",
+                                S.current.comment,
                                 textColor: context.appColors.whiteBG,
                                 fontSize: 14,
                                 isFontRegular: true,

+ 2 - 1
packages/cpt_community/lib/modules/community/newsfeed_detail/newsfeed_detail_state.dart

@@ -1,3 +1,4 @@
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:domain/entity/newsfeed_detail_entity.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:widgets/load_state_layout.dart';
@@ -23,7 +24,7 @@ class NewsfeedDetailState {
         commentFieldInfo = commentFieldInfo ?? {
     'value': '',
     'controller': TextEditingController(),
-    'hintText': 'Please enter your comment',
+    'hintText': S.current.enter_comment,
     'focusNode': FocusNode(),
     'obsecure': false,
   },

+ 3 - 2
packages/cpt_community/lib/modules/community/newsfeed_detail/newsfeed_detail_vm.dart

@@ -4,6 +4,7 @@ import 'package:cpt_community/modules/community/foryou/foryou_vm.dart';
 import 'package:cpt_community/modules/my_posts/my_posts_newsfeed/my_posts_newsfeed_vm.dart';
 import 'package:cpt_community/respository/common_newsfeed.dart';
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:domain/entity/newsfeed_detail_entity.dart';
 import 'package:flutter/cupertino.dart';
@@ -267,13 +268,13 @@ class NewsfeedDetailVm extends _$NewsfeedDetailVm {
   handlerCommentClick(BuildContext context, int newsfeedId, int to_user_id, String to_user_name, bool isReply ) async{
     Log.d("点击了评论按钮 newsfeedId:  $newsfeedId  to_user_id:  $to_user_id  to_user_name:  $to_user_name  isReply:  $isReply ");
 
-    String hintText = 'Please enter your comment';
+    String hintText = S.current.enter_comment;
     if(isReply){
       hintText = 'Reply to $to_user_name: ';
       // 修改对话框的 提示文字
     }else {
       to_user_id = 0; // 评论对象ID(默认传0)
-      String hintText = 'Please enter your comment';
+      String hintText = S.current.enter_comment;
     }
     state = state.copyWith(commentFieldInfo: {
       'value': '',

+ 2 - 2
packages/cpt_community/lib/modules/community/newsfeed_post/newsfeed_post_page.dart

@@ -39,7 +39,7 @@ class NewsfeedPostPage extends HookConsumerWidget {
     return Scaffold(
       appBar: MyAppBar.appBar(
         context,
-        "Create Post",
+        S.current.create_post,
         backgroundColor: context.appColors.backgroundWhite,
       ),
       backgroundColor: ColorUtils.string2Color("#F2F3F6"),
@@ -102,7 +102,7 @@ class NewsfeedPostPage extends HookConsumerWidget {
                   children: [
                     Expanded(
                       child: MyButton(
-                        text: "Submit",
+                        text: S.current.submit,
                         radius: 0,
                         minHeight: 50,
                         backgroundColor: context.appColors.textPrimary,

+ 2 - 1
packages/cpt_community/lib/modules/community/newsfeed_post/newsfeed_post_vm.dart

@@ -1,6 +1,7 @@
 
 import 'package:cpt_community/respository/common_newsfeed.dart';
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:flutter/material.dart';
 import 'package:plugin_basic/constants/app_constant.dart';
 import 'package:plugin_basic/provider/user_config/user_config_service.dart';
@@ -31,7 +32,7 @@ class NewsfeedPostVm extends _$NewsfeedPostVm {
           'mind': {
             'value': '',
             'controller': TextEditingController(),
-            'hintText': 'What\'s on your mind?',
+            'hintText': S.current.what_on_your_mind,
             'focusNode': FocusNode(),
             'obsecure': false,
           }

+ 3 - 2
packages/cpt_community/lib/modules/garage/garagesale_detail/garagesale_detail_page.dart

@@ -1,6 +1,7 @@
 import 'package:cpt_community/modules/garage/garagesale_detail/garagesale_detail_vm.dart';
 import 'package:cpt_community/router/page/community_page_router.dart';
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:domain/entity/garage_sale_rent_detail_entity.dart';
 import 'package:domain/entity/garage_sale_rent_entity.dart';
@@ -44,7 +45,7 @@ class GaragesaleDetailPage extends HookConsumerWidget {
   Widget build(BuildContext context, WidgetRef ref) {
     final state = ref.watch(garagesaleDetailVmProvider);
     final vm = ref.read(garagesaleDetailVmProvider.notifier);
-    final String pageTitle = (type == 'forSale' || type == 'mineForSale') ? 'For Sale' :'For Rent';
+    final String pageTitle = (type == 'forSale' || type == 'mineForSale') ? S.current.for_sale :S.current.for_rent;
     GlobalKey _likeButtonKey = GlobalKey<MyLikeButtonState>();
 
     GarageSaleRentDetailEntity? detailInfo = state.datas?? null;
@@ -72,7 +73,7 @@ class GaragesaleDetailPage extends HookConsumerWidget {
         actions: [
           type=='mineForSale'||type=='mineForRent'?Center(
             child: MyTextView(
-              'Delete',
+              S.current.delete,
               textColor: context.appColors.redDefault,
               fontSize: 16,
               isFontMedium: true,

+ 2 - 1
packages/cpt_community/lib/modules/garage/garagesale_detail/garagesale_detail_vm.dart

@@ -2,6 +2,7 @@ import 'package:cpt_community/modules/garage/for_rent/for_rent_vm.dart';
 import 'package:cpt_community/modules/garage/garagesale_post/garagesale_post_vm.dart';
 import 'package:cpt_community/respository/common_garage.dart';
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:domain/entity/garage_sale_rent_detail_entity.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:plugin_basic/basic_export.dart';
@@ -123,7 +124,7 @@ class GaragesaleDetailVm extends _$GaragesaleDetailVm {
   Future deleteMyGarageData(BuildContext? context, int id) async {
     DialogEngine.show(
       widget: AppDefaultDialog(
-        message: "Are you sure you want to delete?",
+        message: S.current.sure_del,
         confirmAction: () async {
           try {
             Map<String, dynamic> params = {

+ 7 - 7
packages/cpt_community/lib/modules/garage/garagesale_post/garagesale_post_page.dart

@@ -44,7 +44,7 @@ class GaragesalePostPage extends HookConsumerWidget {
     final state = ref.watch(garagesalePostVmProvider);
 
     useEffect((){
-      WidgetsBinding.instance!.addPostFrameCallback((_) {
+      WidgetsBinding.instance.addPostFrameCallback((_) {
         vm.initData(
             type:type
         );
@@ -55,7 +55,7 @@ class GaragesalePostPage extends HookConsumerWidget {
     return Scaffold(
       appBar: MyAppBar.appBar(
         context,
-        (type==1 || type==2)?"Post New Item":"Edit",
+        (type==1 || type==2) ? S.current.post_new_item : S.current.edit,
         backgroundColor: context.appColors.backgroundWhite,
       ),
       backgroundColor: Colors.white,
@@ -85,7 +85,7 @@ class GaragesalePostPage extends HookConsumerWidget {
                                   crossAxisAlignment: CrossAxisAlignment.start,
                                   children: [
                                     FormRequireText(
-                                      text: "Title",
+                                      text: S.current.title,
                                       textColor: context.appColors.textBlack,
                                       fontSize: 17,
                                     ).marginOnly(bottom: 14.5),
@@ -112,7 +112,7 @@ class GaragesalePostPage extends HookConsumerWidget {
                                   crossAxisAlignment: CrossAxisAlignment.start,
                                   children: [
                                     FormRequireText(
-                                      text: "Contact Information",
+                                      text: S.current.contact_information,
                                       textColor: context.appColors.textBlack,
                                       fontSize: 17,
                                     ).marginOnly(bottom: 14.5),
@@ -152,7 +152,7 @@ class GaragesalePostPage extends HookConsumerWidget {
                                   crossAxisAlignment: CrossAxisAlignment.start,
                                   children: [
                                     FormRequireText(
-                                      text: "Price(\$)",
+                                      text: "${S.current.price}(\$)",
                                       textColor: context.appColors.textBlack,
                                       fontSize: 17,
                                     ).marginOnly(bottom: 14.5),
@@ -179,7 +179,7 @@ class GaragesalePostPage extends HookConsumerWidget {
                                 crossAxisAlignment: CrossAxisAlignment.start,
                                 children: [
                                   FormRequireText(
-                                    text: "Description",
+                                    text: S.current.description,
                                     textColor: context.appColors.textBlack,
                                     fontSize: 17,
                                   ).marginOnly(bottom: 14.5),
@@ -206,7 +206,7 @@ class GaragesalePostPage extends HookConsumerWidget {
                   children: [
                     Expanded(
                       child: MyButton(
-                        text: "Submit",
+                        text: S.current.submit,
                         radius: 0,
                         minHeight: 50,
                         backgroundColor: context.appColors.textPrimary,

+ 1 - 0
packages/cpt_community/lib/modules/garage/garagesale_post/garagesale_post_state.dart

@@ -1,3 +1,4 @@
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:flutter/cupertino.dart';
 
 class GaragesalePostPageState {

+ 2 - 1
packages/cpt_community/lib/modules/my_following/components/item_following.dart

@@ -1,6 +1,7 @@
 import 'package:cpt_community/components/comments_dialog.dart';
 import 'package:cpt_community/modules/my_following/my_follow/my_follow_vm.dart';
 import 'package:cpt_community/modules/my_following/my_follower/my_follower_vm.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
@@ -65,7 +66,7 @@ class MyFollowingListItem extends StatelessWidget {
                 builder: (context, ref, child) {
                   final isFollow = useState<bool>(true);
                   return  MyButton(
-                    text: isFollow.value? 'Followed':'+Follow',
+                    text: isFollow.value? S.current.followed : S.current.to_follow,
                     onPressed: () async{
                       final vm = ref.read(itemFollowingVmProvider.notifier);
                       // todo 调用接口 然后更新状态

+ 2 - 1
packages/cpt_community/lib/modules/my_following/my_follow/my_follow_page.dart

@@ -1,4 +1,5 @@
 import 'package:cpt_community/modules/my_following/my_following_vm.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter/rendering.dart';
@@ -125,7 +126,7 @@ class MyFollowPage extends HookConsumerWidget {
                             return Padding(
                               padding: const EdgeInsets.only(top: 10, bottom: 10, left: 10),
                               child: SearchAppBar(
-                                hintText: 'Search',
+                                hintText: S.current.search,
                                 onChanged: (String value){
                                   vm.handlerSearchChange(value);
                                 },

+ 2 - 1
packages/cpt_community/lib/modules/my_following/my_follower/my_follower_page.dart

@@ -1,4 +1,5 @@
 import 'package:cpt_community/modules/my_following/my_following_vm.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter/rendering.dart';
@@ -125,7 +126,7 @@ class MyFollowerPage extends HookConsumerWidget {
                             return Padding(
                               padding: const EdgeInsets.only(top: 10, bottom: 10, left: 10),
                               child: SearchAppBar(
-                                hintText: 'Search',
+                                hintText: S.current.search,
                                 onChanged: (String value){
                                   vm.handlerSearchChange(value);
                                 },

+ 3 - 2
packages/cpt_community/lib/modules/my_following/my_following_page.dart

@@ -2,6 +2,7 @@
 import 'package:cpt_community/components/newsfeed_card_content.dart';
 import 'package:cpt_community/components/newsfeed_card_footer.dart';
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
@@ -85,13 +86,13 @@ class MyFollowingPage extends HookConsumerWidget {
       if(state.currentPageViewIdx == 0){
         return  state.followPageIsSearchBarStatus!? MyAppBar.searchAppBar(context, backgroundColor: context.appColors.backgroundWhite): MyAppBar.appBar(
           context,
-          state.currentPageViewIdx == 0 ? "My Follow" : "My Follower",
+          state.currentPageViewIdx == 0 ? S.current.my_follow : S.current.my_follower,
           backgroundColor: context.appColors.backgroundWhite,
         );
       }else {
         return state.followerPageIsSearchBarStatus!? MyAppBar.searchAppBar(context, backgroundColor: context.appColors.backgroundWhite): MyAppBar.appBar(
           context,
-          state.currentPageViewIdx == 0 ? "My Follow" : "My Follower",
+          state.currentPageViewIdx == 0 ? S.current.my_follow : S.current.my_follower,
           backgroundColor: context.appColors.backgroundWhite,
         );
       }

+ 1 - 1
packages/cpt_community/lib/modules/my_following/my_following_tabs.dart

@@ -15,7 +15,7 @@ import '../community/community_vm.dart';
 import 'my_following_vm.dart';
 
 class MyFollowingTabs extends HookConsumerWidget {
-  List tabsList;
+  List<String> tabsList;
   Widget? Function(BuildContext)? tabItemBuilder;
   dynamic? tabsRouter;
   void Function(int)? onClickAction;

+ 4 - 2
packages/cpt_community/lib/modules/my_following/tabs_data.dart

@@ -1,4 +1,6 @@
+import 'package:cs_resources/generated/l10n.dart';
+
 Map<String, dynamic> tabsNamesData = {
-  'Follow': 'Follow',
-  'Follower': 'Follower',
+  'Follow': S.current.follow,
+  'Follower': S.current.follower,
 };

+ 2 - 1
packages/cpt_community/lib/modules/my_posts/my_posts_page.dart

@@ -1,5 +1,6 @@
 import 'package:cpt_community/modules/my_posts/my_posts_vm.dart';
 import 'package:cpt_community/router/page/community_page_router.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
@@ -56,7 +57,7 @@ class MyPostsPage extends HookConsumerWidget {
     return Scaffold(
       appBar: MyAppBar.appBar(
         context,
-        "My Posts",
+        S.current.my_post,
         backgroundColor: context.appColors.backgroundWhite,
       ),
       backgroundColor: context.appColors.backgroundDefault,

+ 4 - 3
packages/cpt_community/lib/modules/my_posts/my_posts_vm.dart

@@ -1,4 +1,5 @@
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
@@ -34,17 +35,17 @@ class MyPostsVm extends _$MyPostsVm {
         tabsList: [
           {
             'code': 'newsFeed',
-            'title': 'News Feed',
+            'title': S.current.news_feed,
             'publish_num': 0,
           },
           {
             'code': 'forSale',
-            'title': 'For Sale',
+            'title': S.current.for_sale,
             'publish_num': 0,
           },
           {
             'code': 'forRent',
-            'title': 'For Rent',
+            'title': S.current.for_rent,
             'publish_num': 0,
           },
         ]

+ 1 - 1
packages/cpt_facility/lib/modules/book_confirm/book_confirm_page.dart

@@ -159,7 +159,7 @@ class BookConfirmPage extends HookConsumerWidget {
         borderRadius: BorderRadius.circular(6.0), // 圆角
         boxShadow: [
           BoxShadow(
-            color: const Color(0xFFB8BFD9).withOpacity(0.3), // 阴影颜色
+            color: context.appColors.itemBGShadow, // 阴影颜色
             offset: const Offset(0, 3), // 阴影的偏移量
             blurRadius: 8.0, // 模糊半径
             spreadRadius: 3.0, // 扩散半径

+ 1 - 1
packages/cpt_facility/lib/modules/detail/facility_detail_page.dart

@@ -302,7 +302,7 @@ class FacilityDetailPage extends HookConsumerWidget {
         borderRadius: BorderRadius.circular(6.0), // 圆角
         boxShadow: [
           BoxShadow(
-            color: const Color(0xFFB8BFD9).withOpacity(0.3), // 阴影颜色
+            color: context.appColors.itemBGShadow, // 阴影颜色
             offset: const Offset(0, 3), // 阴影的偏移量
             blurRadius: 8.0, // 模糊半径
             spreadRadius: 3.0, // 扩散半径

+ 2 - 2
packages/cpt_main/lib/modules/feedback/detail/feedback_detail_page.dart

@@ -91,7 +91,7 @@ class FeedbackDetailPage extends HookConsumerWidget {
                   borderRadius: BorderRadius.circular(6.0), // 圆角
                   boxShadow: [
                     BoxShadow(
-                      color: const Color(0xFFB8BFD9).withOpacity(0.3), // 阴影颜色
+                      color: context.appColors.itemBGShadow, // 阴影颜色
                       offset: const Offset(0, 3), // 阴影的偏移量
                       blurRadius: 8.0, // 模糊半径
                       spreadRadius: 3.0, // 扩散半径
@@ -164,7 +164,7 @@ class FeedbackDetailPage extends HookConsumerWidget {
             borderRadius: BorderRadius.circular(6.0), // 圆角
             boxShadow: [
               BoxShadow(
-                color: const Color(0xFFB8BFD9).withOpacity(0.3), // 阴影颜色
+                color: context.appColors.itemBGShadow, // 阴影颜色
                 offset: const Offset(0, 3), // 阴影的偏移量
                 blurRadius: 8.0, // 模糊半径
                 spreadRadius: 3.0, // 扩散半径

+ 1 - 1
packages/cpt_main/lib/modules/feedback/item_feedback.dart

@@ -26,7 +26,7 @@ class FeedbackItem extends StatelessWidget {
         borderRadius: BorderRadius.circular(6.0), // 圆角
         boxShadow: [
           BoxShadow(
-            color: const Color(0xFFB8BFD9).withOpacity(0.3), // 阴影颜色
+            color: context.appColors.itemBGShadow, // 阴影颜色
             offset: const Offset(0, 3), // 阴影的偏移量
             blurRadius: 8.0, // 模糊半径
             spreadRadius: 3.0, // 扩散半径

+ 18 - 3
packages/cpt_main/lib/modules/home/home_page.dart

@@ -59,7 +59,12 @@ class HomePage extends HookConsumerWidget {
               alignment: Alignment.topLeft,
               children: <Widget>[
                 // 通知图标
-                const MyAssetImage(Assets.mainHomeNotificationIcon, width: 19, height: 20),
+                MyAssetImage(
+                  Assets.mainHomeNotificationIcon,
+                  width: 19,
+                  height: 20,
+                  color: context.appColors.imageDarkModelWhite,
+                ),
 
                 //未读消息
                 Positioned(
@@ -169,7 +174,12 @@ class HomePage extends HookConsumerWidget {
                   mainAxisSize: MainAxisSize.max,
                   mainAxisAlignment: MainAxisAlignment.center,
                   children: [
-                    const MyAssetImage(Assets.mainHomePaymentIcon, width: 16.5, height: 18).marginOnly(left: 20),
+                    MyAssetImage(
+                      Assets.mainHomePaymentIcon,
+                      width: 16.5,
+                      height: 18,
+                      color: context.appColors.imageDarkModelWhite,
+                    ).marginOnly(left: 20),
                     MyTextView(
                       S.current.payment,
                       textColor: context.appColors.textBlack,
@@ -184,7 +194,12 @@ class HomePage extends HookConsumerWidget {
                   mainAxisSize: MainAxisSize.max,
                   mainAxisAlignment: MainAxisAlignment.center,
                   children: [
-                    const MyAssetImage(Assets.mainHomeRewardsIcon, width: 16.5, height: 17).marginOnly(left: 20),
+                    MyAssetImage(
+                      Assets.mainHomeRewardsIcon,
+                      width: 16.5,
+                      height: 17,
+                      color: context.appColors.imageDarkModelWhite,
+                    ).marginOnly(left: 20),
                     MyTextView(
                       S.current.rewards,
                       textColor: context.appColors.textBlack,

+ 1 - 1
packages/cpt_main/lib/modules/home/latest_news/item_latest_news.dart

@@ -25,7 +25,7 @@ class LatestNewsItem extends StatelessWidget {
         borderRadius: BorderRadius.circular(6.0),
         boxShadow: [
           BoxShadow(
-            color: const Color(0xFFB8BFD9).withOpacity(0.3),
+            color: context.appColors.itemBGShadow,
             offset: const Offset(0, 3),
             blurRadius: 8.0,
             spreadRadius: 3.0,

+ 1 - 1
packages/cpt_main/lib/modules/home/management_guides/item_management_guide.dart

@@ -20,7 +20,7 @@ class ManagementGuideItem extends StatelessWidget {
         borderRadius: BorderRadius.circular(5.0), // 5个圆角
         boxShadow: [
           BoxShadow(
-            color: const Color(0xFF656565).withOpacity(0.1), // 阴影颜色,并且设置透明度
+            color: context.appColors.itemBGShadow, // 阴影颜色,并且设置透明度
             offset: const Offset(0, 1.5), // 阴影的偏移量
             blurRadius: 2.5, // 模糊半径
             spreadRadius: 1.5, // 扩散半径

+ 1 - 1
packages/cpt_main/lib/modules/home/property_news/item_list_news.dart

@@ -26,7 +26,7 @@ class ListNewsItem extends StatelessWidget {
         borderRadius: BorderRadius.circular(6.0), // 圆角
         boxShadow: [
           BoxShadow(
-            color: const Color(0xFFB8BFD9).withOpacity(0.3), // 阴影颜色
+            color: context.appColors.itemBGShadow, // 阴影颜色
             offset: const Offset(0, 3), // 阴影的偏移量
             blurRadius: 8.0, // 模糊半径
             spreadRadius: 3.0, // 扩散半径

+ 1 - 1
packages/cpt_main/lib/modules/visitor/item_visitor.dart

@@ -24,7 +24,7 @@ class VisitorItem extends StatelessWidget {
         borderRadius: BorderRadius.circular(6.0), // 圆角
         boxShadow: [
           BoxShadow(
-            color: const Color(0xFFB8BFD9).withOpacity(0.3), // 阴影颜色
+            color: context.appColors.itemBGShadow, // 阴影颜色
             offset: const Offset(0, 3), // 阴影的偏移量
             blurRadius: 8.0, // 模糊半径
             spreadRadius: 3.0, // 扩散半径

+ 35 - 44
packages/cpt_notice_board/lib/modules/announ/page/announ_page.dart

@@ -1,4 +1,5 @@
 import 'package:cpt_notice_board/modules/notice_board/page/notice_board_page.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
@@ -37,10 +38,7 @@ class AnnounPage extends HookConsumerWidget {
         maxLines: 2, // 设置最大行数为2
         overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
         item['title'],
-        style: const TextStyle(
-            fontSize: 16.0,
-            color: Colors.black,
-            fontWeight: FontWeight.w700), // 设置字体大小
+        style:  TextStyle(fontSize: 16.0, color: context.appColors.textBlack, fontWeight: FontWeight.w700), // 设置字体大小
       ),
     );
   }
@@ -50,10 +48,7 @@ class AnnounPage extends HookConsumerWidget {
       // color: Colors.green,
       child: Text(
         item['created_at'],
-        style: const TextStyle(
-            fontSize: 14.0,
-            color: Colors.black,
-            fontWeight: FontWeight.w400), // 设置字体大小
+        style:  TextStyle(fontSize: 14.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400), // 设置字体大小
       ),
     );
   }
@@ -61,16 +56,18 @@ class AnnounPage extends HookConsumerWidget {
   // listitem
   Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, vm) {
     return Container(
-      decoration: const BoxDecoration(
-        color: Colors.white,
-        borderRadius: BorderRadius.all(Radius.circular(6.0)),
+      decoration: BoxDecoration(
+        color: context.appColors.whiteBG,
+        borderRadius: const BorderRadius.all(Radius.circular(6.0)),
         boxShadow: [
-          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+          BoxShadow(
+            color: context.appColors.itemBGShadow,
+          )
         ],
       ),
       child: Column(
         children: [
-          Container(
+          SizedBox(
             width: MediaQuery.of(context).size.width - 30,
             height: 100,
             // margin: const EdgeInsets.only(left: 15, right: 15, top: 12.5),
@@ -78,8 +75,7 @@ class AnnounPage extends HookConsumerWidget {
               crossAxisAlignment: CrossAxisAlignment.start,
               mainAxisAlignment: MainAxisAlignment.center,
               children: [
-                _buildItemLeftSection(context, ref, item, vm)
-                    .marginOnly(bottom: 5),
+                _buildItemLeftSection(context, ref, item, vm).marginOnly(bottom: 5),
                 _buildItemRightSection(context, ref, item, vm),
               ],
             ).paddingOnly(left: 20, right: 20),
@@ -116,35 +112,30 @@ class AnnounPage extends HookConsumerWidget {
         Log.d("property_news_page 组件卸载时执行");
       };
     }, []);
-    return Scaffold(
-      // appBar: AppBar(title: Text("资产")),
-      body: SizedBox(
-          width: double.infinity,
-          height: double.infinity,
-          child: EasyRefresh(
-              controller: vm.refreshController,
-              // 上拉加载
-              onLoad: () async {
-                Log.d("----onLoad");
-                vm.loadMore();
-              },
-              // 下拉刷新
-              onRefresh: () async {
-                Log.d("----onRefresh");
-                vm.onRefresh();
-              },
-              child: Container(
-                color: ColorUtils.string2Color('#F2F3F6'),
-                padding: const EdgeInsets.only(top: 15),
-                child: LoadStateLayout(
-                  state: state.loadingState,
-                  errorMessage: state.errorMessage,
-                  errorRetry: () {
-                    vm.retryRequest();
-                  },
-                  successSliverWidget: [_buildSaleList(context, ref, vm)],
-                ),
-              ))),
+    return EasyRefresh(
+      controller: vm.refreshController,
+      // 上拉加载
+      onLoad: () async {
+        Log.d("----onLoad");
+        vm.loadMore();
+      },
+      // 下拉刷新
+      onRefresh: () async {
+        Log.d("----onRefresh");
+        vm.onRefresh();
+      },
+      child: Container(
+        color:context.appColors.backgroundDark,
+        padding: const EdgeInsets.only(top: 15),
+        child: LoadStateLayout(
+          state: state.loadingState,
+          errorMessage: state.errorMessage,
+          errorRetry: () {
+            vm.retryRequest();
+          },
+          successSliverWidget: [_buildSaleList(context, ref, vm)],
+        ),
+      ),
     );
   }
 }

+ 8 - 8
packages/cpt_notice_board/lib/modules/announcement_detail/page/announcement_detail_page.dart

@@ -43,9 +43,9 @@ class AnnouncementDetailPage extends HookConsumerWidget {
         Column(children: [
           Text(
             item.title,
-            style: const TextStyle(
+            style: TextStyle(
                 fontSize: 18.0,
-                color: Colors.black,
+                color: context.appColors.textBlack,
                 fontWeight: FontWeight.w700), // 设置字体大小
           ),
           // Row(
@@ -82,18 +82,18 @@ class AnnouncementDetailPage extends HookConsumerWidget {
                 width: 15,
                 height: 15,
               ).marginOnly(right: 8),
-              const Text(
+               Text(
                 'Date: ',
                 style: TextStyle(
                     fontSize: 15.0,
-                    color: Colors.black,
+                    color: context.appColors.textBlack,
                     fontWeight: FontWeight.w700), // 设置字体大小
               ),
               Text(
                 item.createdAt,
-                style: const TextStyle(
+                style: TextStyle(
                     fontSize: 15.0,
-                    color: Colors.black,
+                    color:context.appColors.textBlack,
                     fontWeight: FontWeight.w400), // 设置字体大小
               ),
             ],
@@ -128,7 +128,7 @@ class AnnouncementDetailPage extends HookConsumerWidget {
             .border(bottom: 1, color: ColorUtils.string2Color('#F2F3F6')),
         Column(
           children: [
-            const Column(
+             Column(
               mainAxisAlignment: MainAxisAlignment.center,
               crossAxisAlignment: CrossAxisAlignment.center,
               children: [
@@ -136,7 +136,7 @@ class AnnouncementDetailPage extends HookConsumerWidget {
                   'IMPORTANT',
                   style: TextStyle(
                       fontSize: 18.0,
-                      color: Colors.black,
+                      color: context.appColors.textBlack,
                       fontWeight: FontWeight.w700), // 设置字体大小
                 )
               ],

+ 24 - 23
packages/cpt_notice_board/lib/modules/documents/page/documents_page.dart

@@ -1,4 +1,6 @@
 import 'package:cpt_notice_board/modules/notice_board/page/notice_board_page.dart';
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
@@ -37,41 +39,39 @@ class DocumentsPage extends HookConsumerWidget {
         item['name'],
         maxLines: 1, // 设置最大行数为2
         overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
-        style: const TextStyle(
-            fontSize: 16.0,
-            color: Colors.black,
-            fontWeight: FontWeight.w700), // 设置字体大小
+        style: TextStyle(fontSize: 16.0, color: context.appColors.textBlack, fontWeight: FontWeight.w700), // 设置字体大小
       ),
     ).marginOnly(right: 17.5);
   }
 
-  Widget _buildItemRightSection(
-      BuildContext context, WidgetRef ref, item, _vm) {
+  Widget _buildItemRightSection(BuildContext context, WidgetRef ref, item, _vm) {
     return Container(
-      color: Colors.white,
+      color: context.appColors.whiteBG,
       child: TextButton(
         onPressed: () {
           DocumentsListPage.startInstance(id: item['id']);
           // DocumentsListPage.startInstance(context: context);
         },
         style: TextButton.styleFrom(
-          foregroundColor: Colors.black,
-          backgroundColor: ColorUtils.string2Color('#4161D0'), // 背景颜色
-          minimumSize: const Size(91.5, 30), // 最小宽度和高度
-          padding:
-              const EdgeInsets.symmetric(horizontal: 11.0, vertical: 9), // 内边距
+          foregroundColor: context.appColors.textBlack,
+          backgroundColor: context.appColors.tabBgSelectedPrimary,
+          // 背景颜色
+          minimumSize: const Size(91.5, 30),
+          // 最小宽度和高度
+          padding: const EdgeInsets.symmetric(horizontal: 11.0, vertical: 9),
+          // 内边距
           shape: RoundedRectangleBorder(
             borderRadius: BorderRadius.circular(5), // 圆角
             side: BorderSide(
-              color: ColorUtils.string2Color('#4161D0'),
+              color: context.appColors.tabBgSelectedPrimary,
               width: 1.0,
             ), // 边框
           ),
         ),
-        child: const Text(
-          'Open Folder',
-          style: const TextStyle(
-            color: Colors.white,
+        child: Text(
+          S.current.open_folder,
+          style: TextStyle(
+            color: context.appColors.textWhite,
           ),
         ),
       ),
@@ -82,11 +82,13 @@ class DocumentsPage extends HookConsumerWidget {
   Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
     String url = item['url'];
     return Container(
-      decoration: const BoxDecoration(
-        color: Colors.white,
+      decoration: BoxDecoration(
+        color: context.appColors.whiteBG,
         borderRadius: BorderRadius.all(Radius.circular(6.0)),
         boxShadow: [
-          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+          BoxShadow(
+            color: context.appColors.itemBGShadow,
+          )
         ],
       ),
       child: Row(
@@ -119,8 +121,7 @@ class DocumentsPage extends HookConsumerWidget {
         // 去详情
         if (url != '') {
           // _vm.launchURL(url);
-          GlobalWebPage.startInstance(
-              context: context, title: item['name'], url: url);
+          GlobalWebPage.startInstance(context: context, title: item['name'], url: url);
         }
         // DocumentsListPage.startInstance(context: context);
       }),
@@ -166,7 +167,7 @@ class DocumentsPage extends HookConsumerWidget {
                 vm.onRefresh();
               },
               child: Container(
-                color: ColorUtils.string2Color('#F2F3F6'),
+                color: context.appColors.backgroundDark,
                 padding: const EdgeInsets.only(top: 15),
                 child: LoadStateLayout(
                   state: state.loadingState,

+ 15 - 14
packages/cpt_notice_board/lib/modules/documents_list/page/documents_list_page.dart

@@ -1,4 +1,5 @@
 import 'package:cpt_notice_board/modules/notice_board/page/notice_board_page.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
@@ -43,9 +44,9 @@ class DocumentsListPage extends HookConsumerWidget {
         item['name'],
         maxLines: 2, // 设置最大行数为2
         overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
-        style: const TextStyle(
+        style:  TextStyle(
             fontSize: 16.0,
-            color: Colors.black,
+            color: context.appColors.textBlack,
             fontWeight: FontWeight.w700), // 设置字体大小
       ),
     ).marginOnly(right: 17.5);
@@ -58,8 +59,8 @@ class DocumentsListPage extends HookConsumerWidget {
       child: TextButton(
         onPressed: () {},
         style: TextButton.styleFrom(
-          foregroundColor: Colors.black,
-          backgroundColor: ColorUtils.string2Color('#4161D0'), // 背景颜色
+          foregroundColor: context.appColors.textBlack,
+          backgroundColor: context.appColors.tabBgSelectedPrimary, // 背景颜色
           minimumSize: const Size(91.5, 30), // 最小宽度和高度
           padding:
               const EdgeInsets.symmetric(horizontal: 11.0, vertical: 9), // 内边距
@@ -71,10 +72,10 @@ class DocumentsListPage extends HookConsumerWidget {
             ), // 边框
           ),
         ),
-        child: const Text(
-          'Open Folder',
-          style: const TextStyle(
-            color: Colors.white,
+        child: Text(
+          S.current.open_folder,
+          style:  TextStyle(
+            color: context.appColors.textWhite,
           ),
         ),
       ),
@@ -85,11 +86,11 @@ class DocumentsListPage extends HookConsumerWidget {
   Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
     String url = item['url'];
     return Container(
-      decoration: const BoxDecoration(
-        color: Colors.white,
-        borderRadius: BorderRadius.all(Radius.circular(6.0)),
+      decoration:  BoxDecoration(
+        color: context.appColors.whiteBG,
+        borderRadius: const BorderRadius.all(Radius.circular(6.0)),
         boxShadow: [
-          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+          BoxShadow( color: context.appColors.itemBGShadow,)
         ],
       ),
       child: Row(
@@ -149,7 +150,7 @@ class DocumentsListPage extends HookConsumerWidget {
     return Scaffold(
       appBar: MyAppBar.appBar(
         context,
-        "Documents",
+        S.current.documents,
         backgroundColor: context.appColors.backgroundWhite,
       ),
       body: Container(
@@ -166,7 +167,7 @@ class DocumentsListPage extends HookConsumerWidget {
                 vm.onRefresh();
               },
               child: Container(
-                color: ColorUtils.string2Color('#F2F3F6'),
+                color: context.appColors.backgroundDark,
                 padding: const EdgeInsets.only(top: 15),
                 child: LoadStateLayout(
                   state: state.loadingState,

+ 10 - 8
packages/cpt_notice_board/lib/modules/event/page/event_page.dart

@@ -1,5 +1,7 @@
+import 'package:cpt_notice_board/modules/announ/page/announ_page.dart';
 import 'package:cpt_notice_board/modules/event_detail/page/event_detail_page.dart';
 import 'package:cpt_notice_board/modules/notice_board/page/notice_board_page.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
@@ -34,9 +36,9 @@ class EventPage extends HookConsumerWidget {
       maxLines: 2, // 设置最大行数为2
       overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
       item['title'],
-      style: const TextStyle(
+      style:  TextStyle(
           fontSize: 16.0,
-          color: Colors.black,
+          color: context.appColors.textBlack,
           fontWeight: FontWeight.w700), // 设置字体大小
     );
   }
@@ -47,9 +49,9 @@ class EventPage extends HookConsumerWidget {
       // color: Colors.green,
       child: Text(
         item['created_at'],
-        style: const TextStyle(
+        style:  TextStyle(
             fontSize: 14.0,
-            color: Colors.black,
+            color: context.appColors.textBlack,
             fontWeight: FontWeight.w400), // 设置字体大小
       ),
     );
@@ -58,11 +60,11 @@ class EventPage extends HookConsumerWidget {
   // listitem
   Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
     return Container(
-      decoration: const BoxDecoration(
-        color: Colors.white,
+      decoration:  BoxDecoration(
+        color: context.appColors.whiteBG,
         borderRadius: BorderRadius.all(Radius.circular(6.0)),
         boxShadow: [
-          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+          BoxShadow(  color: context.appColors.itemBGShadow,)
         ],
       ),
       child: Column(
@@ -130,7 +132,7 @@ class EventPage extends HookConsumerWidget {
                 vm.onRefresh();
               },
               child: Container(
-                color: ColorUtils.string2Color('#F2F3F6'),
+                color: context.appColors.backgroundDark,
                 padding: const EdgeInsets.only(top: 15),
                 child: LoadStateLayout(
                   state: state.loadingState,

+ 20 - 16
packages/cpt_notice_board/lib/modules/event_detail/page/event_detail_page.dart

@@ -21,6 +21,7 @@ import '../vm/event_detail_vm.dart';
 @RoutePage()
 class EventDetailPage extends HookConsumerWidget {
   final int? id;
+
   const EventDetailPage({Key? key, @PathParam('id') required this.id})
       : super(key: key);
 
@@ -43,9 +44,9 @@ class EventDetailPage extends HookConsumerWidget {
         Column(children: [
           Text(
             item.title,
-            style: const TextStyle(
+            style: TextStyle(
                 fontSize: 18.0,
-                color: Colors.black,
+                color: context.appColors.textBlack,
                 fontWeight: FontWeight.w700), // 设置字体大小
           ),
           Row(
@@ -66,9 +67,9 @@ class EventDetailPage extends HookConsumerWidget {
               // ),
               Text(
                 item.datetime,
-                style: const TextStyle(
+                style: TextStyle(
                     fontSize: 15.0,
-                    color: Colors.black,
+                    color: context.appColors.textBlack,
                     fontWeight: FontWeight.w400), // 设置字体大小
               ),
             ],
@@ -96,10 +97,13 @@ class EventDetailPage extends HookConsumerWidget {
             // ).marginOnly(bottom: 25),
             resources!.length > 0
                 ? MyLoadImage(
-                    resources[0] ?? '',
-                    width: MediaQuery.of(context).size.width,
-                    height: 150,
-                  ).marginOnly(bottom: 15)
+              resources[0] ?? '',
+              width: MediaQuery
+                  .of(context)
+                  .size
+                  .width,
+              height: 150,
+            ).marginOnly(bottom: 15)
                 : Container(),
             Html(
               data: item.content,
@@ -137,15 +141,15 @@ class EventDetailPage extends HookConsumerWidget {
           },
           successWidget: Container(
               child: EasyRefresh(
-            child: SingleChildScrollView(
-                scrollDirection: Axis.vertical,
-                physics: const BouncingScrollPhysics(),
-                clipBehavior: Clip.none,
-                child: Padding(
-                    padding:
+                child: SingleChildScrollView(
+                    scrollDirection: Axis.vertical,
+                    physics: const BouncingScrollPhysics(),
+                    clipBehavior: Clip.none,
+                    child: Padding(
+                        padding:
                         const EdgeInsets.only(left: 15, right: 15, top: 15),
-                    child: _buildDetailTop(context, ref, _vm, detailInfo))),
-          ))),
+                        child: _buildDetailTop(context, ref, _vm, detailInfo))),
+              ))),
     );
   }
 }

+ 8 - 11
packages/cpt_notice_board/lib/modules/notice_board/page/notice_board_page.dart

@@ -1,3 +1,4 @@
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
@@ -36,7 +37,7 @@ class NoticeBoardPage extends HookConsumerWidget {
     final curIdx =
         ref.watch(noticeBoardVmProvider.select((value) => value.curIdx));
     return Container(
-      color: Colors.white,
+      color: context.appColors.whiteBG,
       child: Center(
         child: Row(
           mainAxisAlignment: MainAxisAlignment.center,
@@ -46,20 +47,17 @@ class NoticeBoardPage extends HookConsumerWidget {
             return Column(
               children: [
                 Container(
-                  width: MediaQuery.of(context).size.width /
-                          topSectionsData.length -
-                      36,
+                  width: MediaQuery.of(context).size.width / topSectionsData.length - 36,
                   height: 70,
                   padding: const EdgeInsets.only(
                       top: 18, left: 15, right: 15, bottom: 15),
                   decoration: BoxDecoration(
-                    color:  ColorUtils.string2Color('#E6F2FF'),
+                    color: context.appColors.lightBlueBg, // 设置圆形背景颜色
                     shape: BoxShape.circle, // 设置为圆形
                     boxShadow: tabsRouter.activeIndex == index
                         ? [
                             BoxShadow(
-                              color: context
-                                  .appColors.tabLightBlueShadow, // 设置阴影颜色
+                              color: context.appColors.tabLightBlueShadow, // 设置阴影颜色
                               blurRadius: 5, // 设置模糊半径
                               spreadRadius: 0.05, // 控制阴影扩散
                               offset: const Offset(0, 4), // 设置阴影偏移量
@@ -84,9 +82,8 @@ class NoticeBoardPage extends HookConsumerWidget {
                   maxLines: 1, // 设置最大行数为2
                   isTextEllipsis: true, // 超出部分用省略号表示
                   fontSize: 13,
-                  textColor: currentTabIdx == index
-                      ? ColorUtils.string2Color('#4161D0')
-                      : Colors.black,
+                  textColor: currentTabIdx == index?
+                  context.appColors.tabTextSelectedDefault : context.appColors.tabTextUnSelectedDefault,
                   isFontMedium: true,
                 ),
               ],
@@ -103,7 +100,7 @@ class NoticeBoardPage extends HookConsumerWidget {
     return Scaffold(
         appBar: MyAppBar.appBar(
           context,
-          "Notice Board",
+          S.current.notice_board,
           backgroundColor: context.appColors.backgroundWhite,
         ),
         body: AutoTabsRouter.pageView(

+ 4 - 3
packages/cpt_notice_board/lib/modules/notice_board/vm/notice_board_view_model.dart

@@ -15,6 +15,7 @@
 
 
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
@@ -37,19 +38,19 @@ class NoticeBoardVmState {
     this.curIdx = 0,
   }) : topSectionsData = topSectionsData?? [
     {
-      "title": "Announcement",
+      "title": S.current.announcement,
       "icon": Assets.noticeBoardAnnouncementIcon,
       "pageStartInstanceFn": AnnounPage.startInstance,
       "page": const AnnounPage(),
     },
     {
-      "title": "Event",
+      "title": S.current.event,
       "icon": Assets.noticeBoardEventIcon,
       "pageStartInstanceFn": EventPage.startInstance,
       "page": const EventPage(),
     },
     {
-      "title": "Documents",
+      "title": S.current.documents,
       "icon": Assets.noticeBoardDocumentsIcon,
       "pageStartInstanceFn": DocumentsPage.startInstance,
       "page": const DocumentsPage(),

+ 1 - 1
packages/cpt_notice_board/lib/router/page/notice_board_page_router.dart

@@ -13,7 +13,7 @@ import '../../modules/documents_list/page/documents_list_page.dart';
 
 part 'notice_board_page_router.gr.dart';
 
-/*\
+/*
  * NoticeBoard 模块的路由
  */
 @AutoRouterConfig(replaceInRouteName: 'Page|Screen,PageRoute')

+ 2 - 5
packages/cpt_payment/lib/modules/choose_card/choose_card_page.dart

@@ -13,8 +13,8 @@ import 'package:widgets/my_text_view.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../router/page/payment_page_router.dart';
-import '../payment/manage/item_manage.dart';
 import 'choose_card_view_model.dart';
+import 'item_card.dart';
 
 @RoutePage()
 class ChooseCardPage extends HookConsumerWidget {
@@ -90,12 +90,9 @@ class ChooseCardPage extends HookConsumerWidget {
                   SliverList(
                       delegate: SliverChildBuilderDelegate(
                     (context, index) {
-                      return ManageItem(
+                      return CardItem(
                         index: index,
                         item: state.datas[index],
-                        deleteAction: () {
-                          viewModel.showDeleteDialog(index);
-                        },
                       ).onTap(() {
                         viewModel.setAsPrimary(index);
                       });

+ 2 - 1
packages/cpt_payment/lib/modules/choose_card/choose_card_view_model.dart

@@ -1,4 +1,5 @@
 import 'package:cpt_payment/modules/add_card/add_card_page.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:plugin_platform/engine/dialog/dialog_engine.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
@@ -154,7 +155,7 @@ class ChooseCardViewModel extends _$ChooseCardViewModel {
   void showDeleteDialog(int index) {
     DialogEngine.show(
         widget: AppDefaultDialog(
-      message: "Are you sure you want to delete this Card?",
+      message: S.current.sure_del_card,
       confirmAction: () {
         ToastEngine.show("点击了确定");
       },

+ 65 - 0
packages/cpt_payment/lib/modules/choose_card/item_card.dart

@@ -0,0 +1,65 @@
+import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/material.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/my_text_view.dart';
+
+///  选择银行卡的Item
+class CardItem extends StatelessWidget {
+  final int index;
+  final bool item;
+
+  const CardItem({
+    required this.index,
+    required this.item,
+  });
+
+  @override
+  Widget build(BuildContext context) {
+    return Container(
+      margin: const EdgeInsets.only(top: 1),
+      color: context.appColors.whiteBG,
+      width: double.infinity,
+      padding: const EdgeInsets.only(left: 20, right: 23, top: 20, bottom: 20),
+      child: Row(
+        mainAxisSize: MainAxisSize.max,
+        crossAxisAlignment: CrossAxisAlignment.center,
+        children: [
+          //选中
+          MyAssetImage(
+            item ? Assets.baseServiceRadioChecked : Assets.baseServiceRadioUncheck,
+            width: 25,
+            height: 25,
+          ),
+
+          const MyAssetImage(
+            Assets.facilityAddCardMaster,
+            height: 38,
+          ).marginOnly(left: 9, right: 9),
+
+          Column(
+            crossAxisAlignment: CrossAxisAlignment.start,
+            children: [
+              MyTextView(
+                "Wu Bing Bing's Card",
+                textColor: context.appColors.textBlack,
+                fontSize: 13.5,
+                isFontRegular: true,
+              ),
+              MyTextView(
+                "Ending 9423",
+                marginTop: 5,
+                textColor: context.appColors.textBlack,
+                fontSize: 13.5,
+                isFontRegular: true,
+              ),
+            ],
+          ).expanded(),
+
+        ],
+      ),
+    );
+  }
+}

+ 1 - 1
packages/cpt_payment/lib/modules/payment/history/item_history_list.dart

@@ -25,7 +25,7 @@ class HistoryListItem extends StatelessWidget {
         borderRadius: BorderRadius.circular(6.0), // 圆角
         boxShadow: [
           BoxShadow(
-            color: const Color(0xFFB8BFD9).withOpacity(0.3), // 阴影颜色
+            color: context.appColors.itemBGShadow, // 阴影颜色
             offset: const Offset(0, 3), // 阴影的偏移量
             blurRadius: 8.0, // 模糊半径
             spreadRadius: 3.0, // 扩散半径

+ 2 - 2
packages/cpt_payment/lib/modules/payment/info/info_screen.dart

@@ -45,7 +45,7 @@ class InfoScreen extends HookConsumerWidget {
                           style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500, color: context.appColors.textPrimary),
                           children: <TextSpan>[
                             const TextSpan(
-                              text: "YY Home",
+                              text: "24IFM",
                             ),
                             TextSpan(
                               text: " Pay",
@@ -92,7 +92,7 @@ class InfoScreen extends HookConsumerWidget {
                 style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500, color: context.appColors.textPrimary),
                 children: <TextSpan>[
                   const TextSpan(
-                    text: "YY Home",
+                    text: "24IFM",
                   ),
                   TextSpan(
                     text: " Pay",

+ 1 - 1
packages/cpt_payment/lib/modules/payment/manage/item_manage.dart

@@ -36,7 +36,7 @@ class ManageItem extends StatelessWidget {
             height: 25,
           ),
 
-          MyAssetImage(
+          const MyAssetImage(
             Assets.facilityAddCardMaster,
             height: 38,
           ).marginOnly(left: 9, right: 9),

+ 2 - 1
packages/cpt_payment/lib/modules/payment/manage/manage_view_model.dart

@@ -1,3 +1,4 @@
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:plugin_platform/engine/dialog/dialog_engine.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
@@ -155,7 +156,7 @@ class ManageViewModel extends _$ManageViewModel {
   void showDeleteDialog(int index) {
     DialogEngine.show(
         widget: AppDefaultDialog(
-      message: "Are you sure you want to delete this Card?",
+      message: S.current.sure_del_card,
       confirmAction: () {
         ToastEngine.show("点击了确定");
       },

+ 1 - 1
packages/cpt_payment/lib/modules/payment/payment/item_payment_list.dart

@@ -29,7 +29,7 @@ class PaymentListItem extends StatelessWidget {
         borderRadius: BorderRadius.circular(6.0), // 圆角
         boxShadow: [
           BoxShadow(
-            color: const Color(0xFFB8BFD9).withOpacity(0.3), // 阴影颜色
+            color: context.appColors.itemBGShadow, // 阴影颜色
             offset: const Offset(0, 3), // 阴影的偏移量
             blurRadius: 8.0, // 模糊半径
             spreadRadius: 3.0, // 扩散半径

+ 2 - 1
packages/cpt_profile/lib/modules/setting/setting_view_model.dart

@@ -2,6 +2,7 @@ import 'package:cpt_profile/modules/change_mobile/change_mobile_page.dart';
 import 'package:cpt_profile/modules/reset_password/reset_password_page.dart';
 import 'package:cpt_profile/modules/setting/dialog/account_deactivation_dialog.dart';
 import 'package:cpt_profile/modules/setting/setting_state.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:plugin_basic/constants/app_constant.dart';
 import 'package:plugin_basic/provider/user_config/user_config_service.dart';
 import 'package:plugin_platform/engine/dialog/dialog_engine.dart';
@@ -38,7 +39,7 @@ class SettingViewModel extends _$SettingViewModel {
   void doLogout() {
     DialogEngine.show(
         widget: AppDefaultDialog(
-      message: "Are you sure you want to logout?",
+      message: S.current.logout_alert,
       confirmAction: () {
         //清除用户登录信息
         UserConfigService.getInstance().handleLogoutParams();

+ 14 - 14
packages/cpt_property/lib/modules/ioan/property_ioan_page.dart

@@ -1,4 +1,5 @@
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
@@ -33,14 +34,14 @@ class PropertyIoanPage extends HookConsumerWidget {
     return Column(
       children: [
         MyTextView(
-          "YY Home",
+          "24IFM",
           textColor: context.appColors.textBlack,
           fontSize: 27,
           isFontMedium: true,
           textAlign: TextAlign.center,
         ),
         MyTextView(
-          "Find the best home loan for you",
+          S.current.find_best_loan,
           textColor: context.appColors.textBlack,
           fontSize: 16,
           isFontRegular: true,
@@ -61,7 +62,7 @@ class PropertyIoanPage extends HookConsumerWidget {
           child: Column(
             children: [
               MyTextView(
-                "YY Home exclusive rates:",
+                S.current.exclusive_rates,
                 textColor: ColorUtils.string2Color('#FEFEFE'),
                 fontSize: 15,
                 boxWidth: 237,
@@ -90,7 +91,7 @@ class PropertyIoanPage extends HookConsumerWidget {
                               fontSize: 30,
                             ),
                             MyTextView(
-                              "Lowest Floating Rate",
+                              S.current.lowest_floating_rate,
                               textColor: ColorUtils.string2Color('#FEFEFE'),
                               fontSize: 14,
                               textAlign: TextAlign.center,
@@ -114,7 +115,7 @@ class PropertyIoanPage extends HookConsumerWidget {
                                 fontSize: 30,
                               ),
                               MyTextView(
-                                "Lowest Floating Rate",
+                                S.current.lowest_floating_rate,
                                 textColor: ColorUtils.string2Color('#FEFEFE'),
                                 fontSize: 14,
                                 textAlign: TextAlign.center,
@@ -129,7 +130,7 @@ class PropertyIoanPage extends HookConsumerWidget {
           ),
         ),
         MyTextView(
-          "Check out what others are offering:",
+          S.current.other_offering,
           textColor: ColorUtils.string2Color('#FEFEFE'),
           fontSize: 15,
           boxWidth: double.infinity,
@@ -158,20 +159,19 @@ class PropertyIoanPage extends HookConsumerWidget {
                   crossAxisAlignment: CrossAxisAlignment.start,
                   children: [
                     Row(
-                      mainAxisAlignment: MainAxisAlignment.center,
+                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                       children: [
                         MyTextView(
-                          "Floating",
+                          S.current.floating_rate,
                           textColor: context.appColors.textBlack,
                           fontSize: 14,
                           textAlign: TextAlign.center,
                         ),
                         MyTextView(
-                          "Fixed",
+                          S.current.fixed_rate,
                           textColor: context.appColors.textBlack,
                           fontSize: 14,
                           textAlign: TextAlign.center,
-                          marginLeft: 50.5,
                         ),
                       ],
                     ),
@@ -261,7 +261,7 @@ class PropertyIoanPage extends HookConsumerWidget {
     return Column(
         children: [
           MyTextView(
-            "The right advice to help you choose the best package in the market!",
+            S.current.choose_best_package,
             textColor: context.appColors.textBlack,
             fontSize: 18,
             isFontMedium: true,
@@ -270,7 +270,7 @@ class PropertyIoanPage extends HookConsumerWidget {
             textAlign: TextAlign.center,
           ),
           MyTextView(
-            "-No Hidden Fees, We Are Out ToHelp You!-Interest Savings With Lowest RatesGuarantee-One-Stop Access to All The BanksPackages",
+            S.current.text_no_hidden_fees,
             textColor: context.appColors.textBlack,
             fontSize: 15,
             textAlign: TextAlign.center,
@@ -287,7 +287,7 @@ class PropertyIoanPage extends HookConsumerWidget {
       child: Column(
         children: [
           MyTextView(
-           "What do we offer?",
+           S.current.what_do_we_offer,
             textColor: context.appColors.textBlack,
             fontSize: 18,
             isFontMedium: true,
@@ -334,7 +334,7 @@ class PropertyIoanPage extends HookConsumerWidget {
       crossAxisAlignment: CrossAxisAlignment.center,
       children: [
         MyTextView(
-          "Our Partners",
+          S.current.our_partners,
           textColor: context.appColors.textBlack,
           fontSize: 18,
           isFontMedium: true,

+ 32 - 72
packages/cpt_property/lib/modules/ioan/property_ioan_vm.dart

@@ -1,5 +1,5 @@
-
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:plugin_platform/engine/dialog/dialog_engine.dart';
@@ -21,69 +21,38 @@ class PropertyIoanVm extends _$PropertyIoanVm {
 
   // Refresh 控制器
   final EasyRefreshController refreshController = EasyRefreshController(
-    controlFinishRefresh: true,  //允许刷新
-    controlFinishLoad: true,   //允许加载
+    controlFinishRefresh: true, //允许刷新
+    controlFinishLoad: true, //允许加载
   );
 
-
   PropertyIoanState initState() {
     return PropertyIoanState(
-        lowestFloatingRate: "3.79%",
-        lowestFixedRate: "2.48%",
-        othersOfferingPic: "",
-        othersOfferingInfoList: [
-          {
-            "floating": "3.08%",
-            "fixed": "3.79%",
-          },
-          {
-            "floating": "3.08%",
-            "fixed": "3.79%",
-          }
-        ],
-        offerTextInfoList: [
-            {
-              "title": "New HomeLoans",
-              "icon": Assets.propertyNewHomeLoans,
-              "iconWidth": 46.0,
-              "iconHeight": 42.5
-            },
-            {
-              "title": "Refinancing",
-              "icon": Assets.propertyRefinancing,
-              "iconWidth": 37.0,
-              "iconHeight": 41.5
-            },
-            {
-              "title": "Home EquityLoans",
-              "icon": Assets.propertyHomeEquityLoans,
-              "iconWidth": 41.5,
-              "iconHeight": 42.5
-            },
-            {
-              "title": "ConveyancingLawyer",
-              "icon": Assets.propertyConveyancingLawyer,
-              "iconWidth": 42.0,
-              "iconHeight": 42.0
-            },
-            {
-              "title": "Approval in Principle",
-              "icon": Assets.propertyApproval,
-              "iconWidth": 41.0,
-              "iconHeight": 39.0
-            },
-            {
-              "title": "OverseasHome Loan",
-              "icon": Assets.propertyOverseasHomeLoan,
-              "iconWidth": 36.0,
-              "iconHeight": 39.0
-            }
-        ]
+      lowestFloatingRate: "3.79%",
+      lowestFixedRate: "2.48%",
+      othersOfferingPic: "",
+      othersOfferingInfoList: [
+        {
+          "floating": "3.08%",
+          "fixed": "3.79%",
+        },
+        {
+          "floating": "3.08%",
+          "fixed": "3.79%",
+        }
+      ],
+      offerTextInfoList: [
+        {"title": S.current.new_homeLoans, "icon": Assets.propertyNewHomeLoans, "iconWidth": 46.0, "iconHeight": 42.5},
+        {"title": S.current.refinancing, "icon": Assets.propertyRefinancing, "iconWidth": 37.0, "iconHeight": 41.5},
+        {"title": S.current.home_equity_loans, "icon": Assets.propertyHomeEquityLoans, "iconWidth": 41.5, "iconHeight": 42.5},
+        {"title": S.current.conveyancing_lawyer, "icon": Assets.propertyConveyancingLawyer, "iconWidth": 42.0, "iconHeight": 42.0},
+        {"title": S.current.approval_in_principle, "icon": Assets.propertyApproval, "iconWidth": 41.0, "iconHeight": 39.0},
+        {"title": S.current.overseas_home_loan, "icon": Assets.propertyOverseasHomeLoan, "iconWidth": 36.0, "iconHeight": 39.0}
+      ],
     );
   }
 
   @override
-  PropertyIoanState build(){
+  PropertyIoanState build() {
     // 引入数据仓库
     // propertyIoanRepository = ref.read(propertyIoanRepositoryProvider);
     // 初始化状态
@@ -94,10 +63,7 @@ class PropertyIoanVm extends _$PropertyIoanVm {
 
   //刷新页面状态
   void changeLoadingState(LoadState loadState, String? errorMsg) {
-    state = state.copyWith(
-        loadingState: loadState,
-        errorMessage: errorMsg
-    );
+    state = state.copyWith(loadingState: loadState, errorMessage: errorMsg);
   }
 
   // 重试请求
@@ -112,7 +78,6 @@ class PropertyIoanVm extends _$PropertyIoanVm {
     featchData();
   }
 
-
   Future featchData() async {
     await Future.delayed(const Duration(milliseconds: 1500));
     //更新展示的状态
@@ -121,12 +86,12 @@ class PropertyIoanVm extends _$PropertyIoanVm {
     _needShowPlaceholder = false;
   }
 
-  requestQuoteConfirmAction(){
+  requestQuoteConfirmAction() {
     Log.d("点击了确定");
     DialogEngine.dismiss(tag: "requestQuote");
   }
 
-  requestQuoteCancelAction(){
+  requestQuoteCancelAction() {
     Log.d("点击了取消");
   }
 
@@ -141,11 +106,8 @@ class PropertyIoanVm extends _$PropertyIoanVm {
         cancelAction: requestQuoteCancelAction,
         messageBuilder: (context) {
           return Container(
-            padding: const EdgeInsets.only(left: 15,right: 15),
-            child: Column(
-              mainAxisAlignment: MainAxisAlignment.start,
-              crossAxisAlignment: CrossAxisAlignment.start,
-              children: [
+              padding: const EdgeInsets.only(left: 15, right: 15),
+              child: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [
                 MyTextView(
                   "Submit Request?",
                   textColor: context.appColors.textBlack,
@@ -162,15 +124,13 @@ class PropertyIoanVm extends _$PropertyIoanVm {
                   // maxLines: 5,
                 ),
                 MyTextView(
-                  "This is a complementary servicebrought to you by YY Home",
+                  "This is a complementary service brought to you by 24IFM",
                   textColor: ColorUtils.string2Color('#666666'),
                   textAlign: TextAlign.left,
                   // maxLines: 5,
                   marginTop: 15,
                 ),
-              ]
-            )
-          );
+              ]));
         },
       ),
     );

+ 1 - 1
packages/cpt_property/lib/modules/news/page/property_news_page.dart

@@ -121,7 +121,7 @@ class PropertyNewsPage extends HookConsumerWidget {
                   children: [
                     Expanded(
                       child: MyTextView(
-                        Utils.getTimeAgo(item['created_at']),
+                        Utils.getTimeAgo(item['created_at'], format: "dd MMM yyyy 'at' hh:mm a"),
                         maxLines: 1, // 设置最大行数为1
                         isTextEllipsis: true, // 超出部分用省略号表示
                         fontSize: 12,

+ 2 - 2
packages/cpt_property/lib/modules/news_detail/property_news_detail_page.dart

@@ -60,7 +60,7 @@ class PropertyNewsDetailPage extends HookConsumerWidget {
     return Scaffold(
       appBar: MyAppBar.appBar(
         context,
-        "News Detail",
+        S.current.news_detail,
         backgroundColor: context.appColors.backgroundWhite,
       ),
       backgroundColor: context.appColors.whiteBG,
@@ -132,7 +132,7 @@ class PropertyNewsDetailPage extends HookConsumerWidget {
               width: SizeConfig().screenWidth,
               height: 190,
               fit: BoxFit.cover,
-            ) : SizedBox.shrink(),
+            ) : const SizedBox.shrink(),
           // 内容
           // MyTextView(
           //   content,

+ 2 - 1
packages/cpt_property/lib/modules/property/page/property_page.dart

@@ -1,4 +1,5 @@
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
@@ -115,7 +116,7 @@ class PropertyPage extends HookConsumerWidget {
     return Scaffold(
         appBar: MyAppBar.appBar(
           context,
-          "Property",
+          S.current.property,
           backgroundColor: context.appColors.backgroundWhite,
           actions: [
              state.currentPageViewIdx == 1? MyAssetImage(

+ 5 - 4
packages/cpt_property/lib/modules/property/page/property_page_state.dart

@@ -1,4 +1,5 @@
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 
 import '../../ioan/property_ioan_page.dart';
 import '../../news/page/property_news_page.dart';
@@ -14,25 +15,25 @@ class PropertyVmState {
     this.currentPageViewIdx = 0,
   }) : topSectionsData = topSectionsData?? [
     {
-      "title": "Ioan",
+      "title": S.current.ioan,
       "icon": Assets.propertyIoan,
       "pageStartInstanceFn": PropertyIoanPage.startInstance,
       "page": const PropertyIoanPage(),
     },
     {
-      "title": "News",
+      "title": S.current.news,
       "icon": Assets.propertyNews,
       "pageStartInstanceFn": PropertyNewsPage.startInstance,
       "page": const PropertyNewsPage(),
     },
     {
-      "title": "Sale",
+      "title": S.current.sale,
       "icon": Assets.propertySale,
       "pageStartInstanceFn": PropertySalePage.startInstance,
       "page": const PropertySalePage(),
     },
     {
-      "title": "Rent",
+      "title": S.current.rent,
       "icon": Assets.propertyRent,
       "pageStartInstanceFn": PropertyRentPage.startInstance,
       "page": const PropertyRentPage(),

+ 2 - 1
packages/cpt_property/lib/modules/rent/page/property_rent_page.dart

@@ -1,4 +1,5 @@
 import 'package:cpt_property/modules/property/page/property_page.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
@@ -75,7 +76,7 @@ class PropertyRentPage extends HookConsumerWidget {
                 isFontMedium: true,
               ),
               MyTextView(
-                'per month',
+                S.current.per_month,
                 fontSize: 12,
               ),
             ],

+ 229 - 373
packages/cpt_rewards/lib/modules/rewards/rewards_page.dart

@@ -7,9 +7,13 @@ import 'package:cpt_rewards/modules/rewards_home/rewards_home_page.dart';
 import 'package:cpt_rewards/modules/rewards_list/rewards_list_page.dart';
 import 'package:cpt_rewards/modules/rewards_my/rewards_my_page.dart';
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:cs_resources/theme/theme_config.dart';
 import 'package:domain/entity/rewards_index_entity.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
+import 'package:flutter/services.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:plugin_basic/modules/global_web_page.dart';
@@ -21,6 +25,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_load_image.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import 'package:intl/intl.dart';
@@ -41,142 +46,160 @@ class RewardsPage extends HookConsumerWidget {
     }
   }
 
-  Widget _buildTop(BuildContext context, WidgetRef ref, _vm, list) {
-    int points = list.points ?? 0;
-    return Container(
-        decoration: BoxDecoration(
-          border: Border(
-              bottom: BorderSide(
-            color: ColorUtils.string2Color('#4161D0'), // 设置bottom边框的颜色
-            width: 45.0, // 设置bottom边框的宽度
-          )),
-          borderRadius: const BorderRadius.only(
-            topLeft: Radius.circular(0.0),
-            topRight: Radius.circular(0.0),
-            bottomLeft: Radius.circular(30.0),
-            bottomRight: Radius.circular(30.0),
-          ), // 圆角
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsVmProvider.notifier);
+    final state = ref.watch(rewardsVmProvider);
+    RewardsIndexEntity? list = state.list;
+
+    useEffect(() {
+      // 组件挂载时执行 - 执行接口请求
+      Future.microtask(() => _vm.initPageData());
+      return () {
+        // 组件卸载时执行
+        Log.d("property_news_page 组件卸载时执行");
+      };
+    }, []);
+
+    return Scaffold(
+      appBar: MyAppBar.appBar(context, S.current.daily_login,
+          backIconPath: Assets.rewardsRewardsBack,
+          backIconWidth: 32.0,
+          backIconHeight: 32.0,
+          titleColor: Colors.white,
+          titleDarkColor: Colors.white,
+          showBackButton: true,
+          backgroundColor: context.appColors.btnBgDefault,
+          systemUiOverlayStyle: MediaQuery.of(context).platformBrightness == Brightness.dark
+              ? ThemeConfig.systemUiOverlayStyleDarkTheme
+              : ThemeConfig.systemUiOverlayStyleLightThemeWhite,
+          actions: [
+            const MyAssetImage(
+              Assets.rewardsRewardsIconWen,
+              width: 20,
+              height: 20,
+            ).marginOnly(right: 15).onTap(() {
+              // 去详情
+              // _vm.launchURL(url);
+              GlobalWebPage.startInstance(context: context, title: S.current.how_do_i_earn_points, url: 'https://yyjobs.sg/terms/PointsRules.html');
+            })
+          ]),
+      body: Column(children: [
+        Expanded(
+          child: LoadStateLayout(
+            state: state.loadingState,
+            errorMessage: state.errorMessage,
+            errorRetry: () {
+              _vm.retryRequest();
+            },
+            successWidget: SingleChildScrollView(
+                scrollDirection: Axis.vertical,
+                physics: const BouncingScrollPhysics(),
+                clipBehavior: Clip.none,
+                child: Column(
+                  children: [
+                    _buildTop(context, ref, _vm, list),
+                    Container(
+                      transform: Matrix4.translationValues(0.0, -45.0, 0.0),
+                      child: Column(
+                        children: [
+                          _buildSearch(context, ref, _vm, list),
+                          _buildSwiper(context, ref, _vm, list),
+                          list?.points != 0 ? _buildList(context, ref, _vm, list) : const SizedBox.shrink(),
+                          _buildHistory(context, ref, _vm, list),
+                        ],
+                      ), // 使用负数margin
+                    ).paddingOnly(left: 15, right: 15),
+                  ],
+                )),
+          ),
         ),
-        child: Column(
-          crossAxisAlignment: CrossAxisAlignment.start,
-          children: [
-            Row(
-              crossAxisAlignment: CrossAxisAlignment.center,
-              mainAxisAlignment: MainAxisAlignment.spaceBetween,
-              children: [
-                const MyAssetImage(
-                  Assets.rewardsRewardsBack,
-                  width: 44,
-                  height: 44,
-                ).onTap(() {
-                  // backCallback
-                  Navigator.pop(context);
-                }),
-                const Text(
-                  'Daily Login',
-                  style: TextStyle(
-                      fontSize: 18.0,
-                      color: Colors.white,
-                      fontWeight: FontWeight.w500), // 设置字体大小
-                ),
-                const MyAssetImage(
-                  Assets.rewardsRewardsIconWen,
-                  width: 20,
-                  height: 20,
-                ).onTap(() {
-                  // 去详情
-                  // _vm.launchURL(url);
-                  GlobalWebPage.startInstance(
-                      context: context, title: 'How Do I Earn Points?', url: 'https://yyjobs.sg/terms/PointsRules.html');
-                })
-              ],
-            ),
-            // const Text(
-            //   '1526 Available Points',
-            //   style: TextStyle(
-            //       fontSize: 18.0,
-            //       color: Colors.white,
-            //       fontWeight: FontWeight.w500), // 设置字体大小
-            // ).paddingOnly(left: 10, top: 20, bottom: 18),
-            Row(
-              crossAxisAlignment: CrossAxisAlignment.center,
-              mainAxisAlignment: MainAxisAlignment.spaceBetween,
-              children: [
-                const Text(
-                  'Available Points',
-                  style: TextStyle(
-                      fontSize: 17.0,
-                      color: Colors.white,
-                      fontWeight: FontWeight.w500), // 设置字体大小
-                ),
-                Container(
-                  decoration: BoxDecoration(
-                    border: Border.all(color: Colors.white, width: 1), // 边框
-                    borderRadius: BorderRadius.circular(8), // 圆角
-                  ),
-                  child: Row(
-                    children: [
-                      const MyAssetImage(
-                        Assets.rewardsRewardsIconJb,
-                        width: 23,
-                        height: 23,
-                      ).marginOnly(right: 5),
-                      Text(
-                        '$points',
-                        style: const TextStyle(
-                            fontSize: 15.0,
-                            color: Colors.white,
-                            fontWeight: FontWeight.w400), // 设置字体大小
-                      ),
-                    ],
-                  ).paddingOnly(left: 10, top: 7, bottom: 7, right: 10),
+      ]).backgroundColor(context.appColors.backgroundDark),
+    );
+  }
+
+  Widget _buildTop(BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
+    int points = list?.points ?? 0;
+    return Container(
+      decoration: BoxDecoration(
+        border: Border(
+            bottom: BorderSide(
+          color: context.appColors.btnBgDefault, // 设置bottom边框的颜色
+          width: 45.0, // 设置bottom边框的宽度
+        )),
+        borderRadius: const BorderRadius.only(
+          topLeft: Radius.circular(0.0),
+          topRight: Radius.circular(0.0),
+          bottomLeft: Radius.circular(30.0),
+          bottomRight: Radius.circular(30.0),
+        ), // 圆角
+      ),
+      child: Column(
+        crossAxisAlignment: CrossAxisAlignment.start,
+        children: [
+          Row(
+            crossAxisAlignment: CrossAxisAlignment.center,
+            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+            children: [
+              Text(
+                S.current.available_points,
+                style: const TextStyle(fontSize: 17.0, color: Colors.white, fontWeight: FontWeight.w500), // 设置字体大小
+              ),
+              Container(
+                decoration: BoxDecoration(
+                  border: Border.all(color: Colors.white, width: 1), // 边框
+                  borderRadius: BorderRadius.circular(8), // 圆角
                 ),
-              ],
-            ).paddingOnly(left: 10, top: 20, bottom: 18),
-          ],
-        )
-            .paddingOnly(top: 15, left: 5, right: 15, bottom: 0)
-            .border(bottom: 0, color: ColorUtils.string2Color('#4161D0'))
-            .backgroundColor(ColorUtils.string2Color('#4161D0')));
+                child: Row(
+                  children: [
+                    const MyAssetImage(
+                      Assets.rewardsRewardsIconJb,
+                      width: 23,
+                      height: 23,
+                    ).marginOnly(right: 5),
+                    Text(
+                      '$points',
+                      style: const TextStyle(fontSize: 15.0, color: Colors.white, fontWeight: FontWeight.w400), // 设置字体大小
+                    ),
+                  ],
+                ).paddingOnly(left: 10, top: 7, bottom: 7, right: 10),
+              ),
+            ],
+          ).paddingOnly(left: 10, top: 0, bottom: 18),
+        ],
+      )
+          .paddingOnly(top: 15, left: 5, right: 15, bottom: 0)
+          .border(bottom: 0, color: context.appColors.btnBgDefault)
+          .backgroundColor(context.appColors.btnBgDefault),
+    );
   }
 
-  Widget _buildSearch(BuildContext context, WidgetRef ref, _vm, list) {
+  Widget _buildSearch(BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
     final dateFormat = DateFormat('yyyy-MM-dd');
     final now = DateFormat('yyyy-MM-dd').format(DateTime.now());
     // final date = list.continuous.currentWeekCheckin[0] ?? now;
     final date = now;
-    final date0 = DateFormat('MM-dd')
-        .format(dateFormat.parse(date).subtract(const Duration(days: 1)));
-    final date1 = DateFormat('MM-dd')
-        .format(dateFormat.parse(date).add(const Duration(days: 1)));
-    final date2 = DateFormat('MM-dd')
-        .format(dateFormat.parse(date).add(const Duration(days: 2)));
-    final date3 = DateFormat('MM-dd')
-        .format(dateFormat.parse(date).add(const Duration(days: 3)));
-    final date4 = DateFormat('MM-dd')
-        .format(dateFormat.parse(date).add(const Duration(days: 4)));
-    final date5 = DateFormat('MM-dd')
-        .format(dateFormat.parse(date).add(const Duration(days: 5)));
+    final date0 = DateFormat('MM-dd').format(dateFormat.parse(date).subtract(const Duration(days: 1)));
+    final date1 = DateFormat('MM-dd').format(dateFormat.parse(date).add(const Duration(days: 1)));
+    final date2 = DateFormat('MM-dd').format(dateFormat.parse(date).add(const Duration(days: 2)));
+    final date3 = DateFormat('MM-dd').format(dateFormat.parse(date).add(const Duration(days: 3)));
+    final date4 = DateFormat('MM-dd').format(dateFormat.parse(date).add(const Duration(days: 4)));
+    final date5 = DateFormat('MM-dd').format(dateFormat.parse(date).add(const Duration(days: 5)));
     // final nextDate = date.add(Duration(days: 1));
     return Container(
       width: MediaQuery.of(context).size.width - 30,
       decoration: BoxDecoration(
-        color: Colors.white,
+        color: context.appColors.whiteBG,
         borderRadius: BorderRadius.circular(10),
-        boxShadow: const [
-          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-        ],
+        boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
       ),
       child: Column(
         crossAxisAlignment: CrossAxisAlignment.start,
         mainAxisAlignment: MainAxisAlignment.center,
         children: [
           Text(
-            'Continuous Login 8 Day',
-            style: TextStyle(
-                fontSize: 15.0,
-                color: ColorUtils.string2Color('#000000'),
-                fontWeight: FontWeight.w500), // 设置字体大小
+            S.current.continuous_login_8_day,
+            style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
           ),
           Flex(
             direction: Axis.horizontal,
@@ -185,10 +208,9 @@ class RewardsPage extends HookConsumerWidget {
                 flex: 1,
                 child: Container(
                   decoration: BoxDecoration(
-                    color: ColorUtils.string2Color('#F2F3F6'),
+                    color: context.appColors.whiteSecondBG,
                     borderRadius: BorderRadius.circular(10),
-                    border: Border.all(
-                        color: ColorUtils.string2Color('#4161D0'), width: 1),
+                    border: Border.all(color: context.appColors.textPrimary, width: 1),
                   ),
                   height: 78,
                   child: Column(
@@ -196,11 +218,8 @@ class RewardsPage extends HookConsumerWidget {
                     mainAxisAlignment: MainAxisAlignment.center,
                     children: [
                       Text(
-                        '$date0',
-                        style: TextStyle(
-                            fontSize: 13.0,
-                            color: ColorUtils.string2Color('#4161D0'),
-                            fontWeight: FontWeight.w400), // 设置字体大小
+                        date0,
+                        style: TextStyle(fontSize: 13.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w400), // 设置字体大小
                       ),
                       const MyAssetImage(
                         Assets.rewardsRewardsIconJb,
@@ -209,10 +228,7 @@ class RewardsPage extends HookConsumerWidget {
                       ),
                       Text(
                         '+2',
-                        style: TextStyle(
-                            fontSize: 15.0,
-                            color: ColorUtils.string2Color('#4161D0'),
-                            fontWeight: FontWeight.w500), // 设置字体大小
+                        style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
                       ),
                     ],
                   ),
@@ -225,8 +241,7 @@ class RewardsPage extends HookConsumerWidget {
                   decoration: BoxDecoration(
                     color: ColorUtils.string2Color('#4161D0'),
                     borderRadius: BorderRadius.circular(10),
-                    border: Border.all(
-                        color: ColorUtils.string2Color('#4161D0'), width: 1),
+                    border: Border.all(color: ColorUtils.string2Color('#4161D0'), width: 1),
                   ),
                   height: 78,
                   child: Column(
@@ -235,10 +250,7 @@ class RewardsPage extends HookConsumerWidget {
                     children: [
                       Text(
                         'Today',
-                        style: TextStyle(
-                            fontSize: 13.0,
-                            color: ColorUtils.string2Color('#ffffff'),
-                            fontWeight: FontWeight.w400), // 设置字体大小
+                        style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#ffffff'), fontWeight: FontWeight.w400), // 设置字体大小
                       ),
                       const MyAssetImage(
                         Assets.rewardsRewardsIconJb,
@@ -247,10 +259,7 @@ class RewardsPage extends HookConsumerWidget {
                       ),
                       Text(
                         '+2',
-                        style: TextStyle(
-                            fontSize: 15.0,
-                            color: ColorUtils.string2Color('#ffffff'),
-                            fontWeight: FontWeight.w500), // 设置字体大小
+                        style: TextStyle(fontSize: 15.0, color: ColorUtils.string2Color('#ffffff'), fontWeight: FontWeight.w500), // 设置字体大小
                       ),
                     ],
                   ),
@@ -263,8 +272,7 @@ class RewardsPage extends HookConsumerWidget {
                   decoration: BoxDecoration(
                     color: ColorUtils.string2Color('#F2F3F6'),
                     borderRadius: BorderRadius.circular(10),
-                    border: Border.all(
-                        color: ColorUtils.string2Color('#F2F3F6'), width: 1),
+                    border: Border.all(color: ColorUtils.string2Color('#F2F3F6'), width: 1),
                   ),
                   height: 78,
                   child: Column(
@@ -273,10 +281,7 @@ class RewardsPage extends HookConsumerWidget {
                     children: [
                       Text(
                         '$date1',
-                        style: TextStyle(
-                            fontSize: 13.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w400), // 设置字体大小
+                        style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400), // 设置字体大小
                       ),
                       const MyAssetImage(
                         Assets.rewardsRewardsIconJb,
@@ -285,10 +290,7 @@ class RewardsPage extends HookConsumerWidget {
                       ),
                       Text(
                         '+2',
-                        style: TextStyle(
-                            fontSize: 15.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w500), // 设置字体大小
+                        style: TextStyle(fontSize: 15.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w500), // 设置字体大小
                       ),
                     ],
                   ),
@@ -301,8 +303,7 @@ class RewardsPage extends HookConsumerWidget {
                   decoration: BoxDecoration(
                     color: ColorUtils.string2Color('#F2F3F6'),
                     borderRadius: BorderRadius.circular(10),
-                    border: Border.all(
-                        color: ColorUtils.string2Color('#F2F3F6'), width: 1),
+                    border: Border.all(color: ColorUtils.string2Color('#F2F3F6'), width: 1),
                   ),
                   height: 78,
                   child: Column(
@@ -311,10 +312,7 @@ class RewardsPage extends HookConsumerWidget {
                     children: [
                       Text(
                         '$date2',
-                        style: TextStyle(
-                            fontSize: 13.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w400), // 设置字体大小
+                        style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400), // 设置字体大小
                       ),
                       const MyAssetImage(
                         Assets.rewardsRewardsIconJb,
@@ -323,10 +321,7 @@ class RewardsPage extends HookConsumerWidget {
                       ),
                       Text(
                         '+2',
-                        style: TextStyle(
-                            fontSize: 15.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w500), // 设置字体大小
+                        style: TextStyle(fontSize: 15.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w500), // 设置字体大小
                       ),
                     ],
                   ),
@@ -343,8 +338,7 @@ class RewardsPage extends HookConsumerWidget {
                   decoration: BoxDecoration(
                     color: ColorUtils.string2Color('#F2F3F6'),
                     borderRadius: BorderRadius.circular(10),
-                    border: Border.all(
-                        color: ColorUtils.string2Color('#F2F3F6'), width: 1),
+                    border: Border.all(color: ColorUtils.string2Color('#F2F3F6'), width: 1),
                   ),
                   height: 78,
                   child: Column(
@@ -353,10 +347,7 @@ class RewardsPage extends HookConsumerWidget {
                     children: [
                       Text(
                         '$date3',
-                        style: TextStyle(
-                            fontSize: 13.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w400), // 设置字体大小
+                        style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400), // 设置字体大小
                       ),
                       const MyAssetImage(
                         Assets.rewardsRewardsIconJb,
@@ -365,10 +356,7 @@ class RewardsPage extends HookConsumerWidget {
                       ),
                       Text(
                         '+2',
-                        style: TextStyle(
-                            fontSize: 15.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w500), // 设置字体大小
+                        style: TextStyle(fontSize: 15.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w500), // 设置字体大小
                       ),
                     ],
                   ),
@@ -381,8 +369,7 @@ class RewardsPage extends HookConsumerWidget {
                   decoration: BoxDecoration(
                     color: ColorUtils.string2Color('#F2F3F6'),
                     borderRadius: BorderRadius.circular(10),
-                    border: Border.all(
-                        color: ColorUtils.string2Color('#F2F3F6'), width: 1),
+                    border: Border.all(color: ColorUtils.string2Color('#F2F3F6'), width: 1),
                   ),
                   height: 78,
                   child: Column(
@@ -391,10 +378,7 @@ class RewardsPage extends HookConsumerWidget {
                     children: [
                       Text(
                         '$date4',
-                        style: TextStyle(
-                            fontSize: 13.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w400), // 设置字体大小
+                        style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400), // 设置字体大小
                       ),
                       const MyAssetImage(
                         Assets.rewardsRewardsIconJb,
@@ -403,10 +387,7 @@ class RewardsPage extends HookConsumerWidget {
                       ),
                       Text(
                         '+2',
-                        style: TextStyle(
-                            fontSize: 15.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w500), // 设置字体大小
+                        style: TextStyle(fontSize: 15.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w500), // 设置字体大小
                       ),
                     ],
                   ),
@@ -419,8 +400,7 @@ class RewardsPage extends HookConsumerWidget {
                   decoration: BoxDecoration(
                     color: ColorUtils.string2Color('#F2F3F6'),
                     borderRadius: BorderRadius.circular(10),
-                    border: Border.all(
-                        color: ColorUtils.string2Color('#F2F3F6'), width: 1),
+                    border: Border.all(color: ColorUtils.string2Color('#F2F3F6'), width: 1),
                   ),
                   height: 78,
                   child: Row(
@@ -433,17 +413,11 @@ class RewardsPage extends HookConsumerWidget {
                         children: [
                           Text(
                             '$date5',
-                            style: TextStyle(
-                                fontSize: 13.0,
-                                color: ColorUtils.string2Color('#000000'),
-                                fontWeight: FontWeight.w400), // 设置字体大小
+                            style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400), // 设置字体大小
                           ),
                           Text(
                             '+ More',
-                            style: TextStyle(
-                                fontSize: 12.0,
-                                color: ColorUtils.string2Color('#000000'),
-                                fontWeight: FontWeight.w500), // 设置字体大小
+                            style: TextStyle(fontSize: 12.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w500), // 设置字体大小
                           ),
                         ],
                       ),
@@ -463,42 +437,33 @@ class RewardsPage extends HookConsumerWidget {
     );
   }
 
-  Widget _buildSwiper(BuildContext context, WidgetRef ref, _vm, list) {
-    int points = list.points ?? 0;
+  Widget _buildSwiper(BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
+    int points = list?.points ?? 0;
     return Container(
       // color: Colors.white,
       height: 55,
       decoration: BoxDecoration(
-        color: Colors.white,
+        color: context.appColors.whiteBG,
         borderRadius: BorderRadius.circular(10),
-        boxShadow: const [
-          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-        ],
+        boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
       ),
       child: Row(
         crossAxisAlignment: CrossAxisAlignment.center,
         mainAxisAlignment: MainAxisAlignment.spaceBetween,
         children: [
           Text(
-            'How To Get Rewards?',
-            style: TextStyle(
-                fontSize: 15.0,
-                color: ColorUtils.string2Color('#000000'),
-                fontWeight: FontWeight.w500), // 设置字体大小
+            S.current.how_to_get_rewards,
+            style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
           ),
           Container(
-            padding:
-                const EdgeInsets.only(top: 10, bottom: 10, left: 17, right: 17),
+            padding: const EdgeInsets.only(top: 10, bottom: 10, left: 17, right: 17),
             decoration: BoxDecoration(
-              color: ColorUtils.string2Color('#4161D0'),
+              color: context.appColors.btnBgDefaultDark,
               borderRadius: BorderRadius.circular(5),
             ),
             child: Text(
-              'Rewards',
-              style: TextStyle(
-                  fontSize: 14.0,
-                  color: ColorUtils.string2Color('#ffffff'),
-                  fontWeight: FontWeight.w400), // 设置字体大小
+              S.current.rewards,
+              style: TextStyle(fontSize: 14.0, color: ColorUtils.string2Color('#ffffff'), fontWeight: FontWeight.w400), // 设置字体大小
             ).onTap(() {
               RewardsHomePage.startInstance(points: points);
             }),
@@ -508,29 +473,26 @@ class RewardsPage extends HookConsumerWidget {
     ).marginOnly(top: 12, bottom: 12);
   }
 
-  Widget _buildList(BuildContext context, WidgetRef ref, _vm, list) {
-    bool newsFeed = list.tasks.newsFeedPost;
-    int giveLikes = list.tasks.give10Likes;
+  Widget _buildList(BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
+    bool newsFeed = list?.tasks?.newsFeedPost ?? false;
+    int giveLikes = list?.tasks?.give10Likes ?? 0;
     return Container(
       decoration: BoxDecoration(
-        color: Colors.white,
+        color: context.appColors.whiteBG,
         borderRadius: BorderRadius.circular(10),
-        boxShadow: const [
-          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-        ],
+        boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
       ),
       child: Column(
         crossAxisAlignment: CrossAxisAlignment.center,
         mainAxisAlignment: MainAxisAlignment.center,
         children: [
           Container(
-            padding:
-                const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
+            padding: const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
             decoration: BoxDecoration(
                 border: Border(
                     bottom: BorderSide(
               width: 1.0, // 底边边框的宽度
-              color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+              color: context.appColors.backgroundDark, // 底边边框的颜色
             ))),
             child: Row(
               crossAxisAlignment: CrossAxisAlignment.center,
@@ -539,8 +501,7 @@ class RewardsPage extends HookConsumerWidget {
                 Row(
                   children: [
                     Container(
-                      padding: const EdgeInsets.only(
-                          top: 10, bottom: 10, left: 17, right: 17),
+                      padding: const EdgeInsets.only(top: 10, bottom: 10, left: 17, right: 17),
                       decoration: BoxDecoration(
                         color: ColorUtils.string2Color('#f2f3f6'),
                         borderRadius: BorderRadius.circular(5),
@@ -556,20 +517,14 @@ class RewardsPage extends HookConsumerWidget {
                       mainAxisAlignment: MainAxisAlignment.center,
                       children: [
                         Text(
-                          'Daily Login',
-                          style: TextStyle(
-                              fontSize: 15.0,
-                              color: ColorUtils.string2Color('#000000'),
-                              fontWeight: FontWeight.w500), // 设置字体大小
+                          S.current.daily_login,
+                          style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
                         ).marginOnly(bottom: 6),
                         Row(
                           children: [
                             Text(
                               '+2',
-                              style: TextStyle(
-                                  fontSize: 15.0,
-                                  color: ColorUtils.string2Color('#4161D0'),
-                                  fontWeight: FontWeight.w500), // 设置字体大小
+                              style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
                             ),
                             const MyAssetImage(
                               Assets.rewardsRewardsIconJb,
@@ -586,18 +541,14 @@ class RewardsPage extends HookConsumerWidget {
                   width: 86,
                   height: 30,
                   decoration: BoxDecoration(
-                    color: ColorUtils.string2Color('#ffffff'),
+                    color: Colors.transparent,
                     borderRadius: BorderRadius.circular(5),
-                    border: Border.all(
-                        color: ColorUtils.string2Color('#4161D0'), width: 1),
+                    border: Border.all(color: context.appColors.btnBgDefaultDark, width: 1),
                   ),
                   child: Center(
                     child: Text(
-                      'Check In',
-                      style: TextStyle(
-                          fontSize: 14.0,
-                          color: ColorUtils.string2Color('#4161D0'),
-                          fontWeight: FontWeight.w400), // 设置字体大小
+                      S.current.check_in,
+                      style: TextStyle(fontSize: 14.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w400), // 设置字体大小
                     ),
                   ),
                 ),
@@ -605,13 +556,12 @@ class RewardsPage extends HookConsumerWidget {
             ),
           ),
           Container(
-            padding:
-                const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
+            padding: const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
             decoration: BoxDecoration(
                 border: Border(
                     bottom: BorderSide(
               width: 1.0, // 底边边框的宽度
-              color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+              color: context.appColors.backgroundDark, // 底边边框的颜色
             ))),
             child: Row(
               crossAxisAlignment: CrossAxisAlignment.center,
@@ -620,8 +570,7 @@ class RewardsPage extends HookConsumerWidget {
                 Row(
                   children: [
                     Container(
-                      padding: const EdgeInsets.only(
-                          top: 10, bottom: 10, left: 17, right: 17),
+                      padding: const EdgeInsets.only(top: 10, bottom: 10, left: 17, right: 17),
                       decoration: BoxDecoration(
                         color: ColorUtils.string2Color('#f2f3f6'),
                         borderRadius: BorderRadius.circular(5),
@@ -637,20 +586,14 @@ class RewardsPage extends HookConsumerWidget {
                       mainAxisAlignment: MainAxisAlignment.center,
                       children: [
                         Text(
-                          'News Feed Post',
-                          style: TextStyle(
-                              fontSize: 15.0,
-                              color: ColorUtils.string2Color('#000000'),
-                              fontWeight: FontWeight.w500), // 设置字体大小
+                          S.current.news_feed_post,
+                          style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
                         ).marginOnly(bottom: 6),
                         Row(
                           children: [
                             Text(
                               '+2',
-                              style: TextStyle(
-                                  fontSize: 15.0,
-                                  color: ColorUtils.string2Color('#4161D0'),
-                                  fontWeight: FontWeight.w500), // 设置字体大小
+                              style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
                             ),
                             const MyAssetImage(
                               Assets.rewardsRewardsIconJb,
@@ -667,18 +610,14 @@ class RewardsPage extends HookConsumerWidget {
                   width: 86,
                   height: 30,
                   decoration: BoxDecoration(
-                    color: ColorUtils.string2Color('#ffffff'),
+                    color: Colors.transparent,
                     borderRadius: BorderRadius.circular(5),
-                    border: Border.all(
-                        color: ColorUtils.string2Color('#4161D0'), width: 1),
+                    border: Border.all(color: context.appColors.btnBgDefaultDark, width: 1),
                   ),
                   child: Center(
                     child: Text(
-                      newsFeed == true ? 'Completed' : 'incomplete',
-                      style: TextStyle(
-                          fontSize: 14.0,
-                          color: ColorUtils.string2Color('#4161D0'),
-                          fontWeight: FontWeight.w400), // 设置字体大小
+                      newsFeed == true ? S.current.completed : S.current.incomplete,
+                      style: TextStyle(fontSize: 14.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w400), // 设置字体大小
                     ),
                   ),
                 ),
@@ -686,13 +625,12 @@ class RewardsPage extends HookConsumerWidget {
             ),
           ),
           Container(
-            padding:
-                const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
+            padding: const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
             decoration: BoxDecoration(
                 border: Border(
                     bottom: BorderSide(
               width: 1.0, // 底边边框的宽度
-              color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+              color: context.appColors.backgroundDark, // 底边边框的颜色
             ))),
             child: Row(
               crossAxisAlignment: CrossAxisAlignment.center,
@@ -701,8 +639,7 @@ class RewardsPage extends HookConsumerWidget {
                 Row(
                   children: [
                     Container(
-                      padding: const EdgeInsets.only(
-                          top: 10, bottom: 10, left: 17, right: 17),
+                      padding: const EdgeInsets.only(top: 10, bottom: 10, left: 17, right: 17),
                       decoration: BoxDecoration(
                         color: ColorUtils.string2Color('#f2f3f6'),
                         borderRadius: BorderRadius.circular(5),
@@ -718,20 +655,14 @@ class RewardsPage extends HookConsumerWidget {
                       mainAxisAlignment: MainAxisAlignment.center,
                       children: [
                         Text(
-                          'Give 10 Likes',
-                          style: TextStyle(
-                              fontSize: 15.0,
-                              color: ColorUtils.string2Color('#000000'),
-                              fontWeight: FontWeight.w500), // 设置字体大小
+                          S.current.give_10_likes,
+                          style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
                         ).marginOnly(bottom: 6),
                         Row(
                           children: [
                             Text(
                               '+2',
-                              style: TextStyle(
-                                  fontSize: 15.0,
-                                  color: ColorUtils.string2Color('#4161D0'),
-                                  fontWeight: FontWeight.w500), // 设置字体大小
+                              style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
                             ),
                             const MyAssetImage(
                               Assets.rewardsRewardsIconJb,
@@ -748,18 +679,14 @@ class RewardsPage extends HookConsumerWidget {
                   width: 86,
                   height: 30,
                   decoration: BoxDecoration(
-                    color: ColorUtils.string2Color('#ffffff'),
+                    color: Colors.transparent,
                     borderRadius: BorderRadius.circular(5),
-                    border: Border.all(
-                        color: ColorUtils.string2Color('#4161D0'), width: 1),
+                    border: Border.all(color: context.appColors.btnBgDefaultDark, width: 1),
                   ),
                   child: Center(
                     child: Text(
-                      giveLikes == 10 ? 'Completed' : '$giveLikes/10',
-                      style: TextStyle(
-                          fontSize: 14.0,
-                          color: ColorUtils.string2Color('#4161D0'),
-                          fontWeight: FontWeight.w400), // 设置字体大小
+                      giveLikes == 10 ? S.current.completed : '$giveLikes/10',
+                      style: TextStyle(fontSize: 14.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w400), // 设置字体大小
                     ),
                   ),
                 ),
@@ -771,54 +698,42 @@ class RewardsPage extends HookConsumerWidget {
     ).marginOnly(bottom: 12);
   }
 
-  Widget _buildHistory(BuildContext context, WidgetRef ref, _vm, list) {
-    List latest = list.latest;
+  Widget _buildHistory(BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
+    List latest = list?.latest ?? [];
     return Container(
       decoration: BoxDecoration(
-        color: Colors.white,
+        color: context.appColors.whiteBG,
         borderRadius: BorderRadius.circular(10),
-        boxShadow: const [
-          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-        ],
+        boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
       ),
       child: Column(
         crossAxisAlignment: CrossAxisAlignment.center,
         mainAxisAlignment: MainAxisAlignment.center,
         children: [
-          Row(
-              crossAxisAlignment: CrossAxisAlignment.center,
-              mainAxisAlignment: MainAxisAlignment.spaceBetween,
-              children: [
-                Text(
-                  'Points History',
-                  style: TextStyle(
-                      fontSize: 15.0,
-                      color: ColorUtils.string2Color('#000000'),
-                      fontWeight: FontWeight.w500), // 设置字体大小
-                ),
-                Text(
-                  'More >',
-                  style: TextStyle(
-                      fontSize: 15.0,
-                      color: ColorUtils.string2Color('#4161D0'),
-                      fontWeight: FontWeight.w500), // 设置字体大小
-                ).onTap(() {
-                  RewardsHistoryPage.startInstance();
-                })
-              ]).paddingOnly(left: 15, right: 15, top: 15, bottom: 5),
+          Row(crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
+            Text(
+              S.current.points_history,
+              style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
+            ),
+            Text(
+              S.current.more_arrow,
+              style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
+            ).onTap(() {
+              RewardsHistoryPage.startInstance();
+            })
+          ]).paddingOnly(left: 15, right: 15, top: 15, bottom: 5),
           Column(
               crossAxisAlignment: CrossAxisAlignment.center,
               mainAxisAlignment: MainAxisAlignment.center,
               children: List.generate(latest.length, (index) {
                 int point = latest[index]['point'];
                 return Container(
-                  padding: const EdgeInsets.only(
-                      top: 15, bottom: 15, left: 15, right: 15),
+                  padding: const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
                   decoration: BoxDecoration(
                       border: Border(
                           bottom: BorderSide(
                     width: 1.0, // 底边边框的宽度
-                    color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+                    color: context.appColors.backgroundDark, // 底边边框的颜色
                   ))),
                   child: Row(
                     crossAxisAlignment: CrossAxisAlignment.center,
@@ -830,16 +745,13 @@ class RewardsPage extends HookConsumerWidget {
                         children: [
                           Text(
                             latest[index]['short_description'],
-                            style: TextStyle(
-                                fontSize: 15.0,
-                                color: ColorUtils.string2Color('#000000'),
-                                fontWeight: FontWeight.w500), // 设置字体大小
+                            style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
                           ).marginOnly(bottom: 6),
                           Text(
                             latest[index]['created_at'],
                             style: TextStyle(
                                 fontSize: 13.0,
-                                color: ColorUtils.string2Color('#808DAF'),
+                                color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#808DAF'), darkColor: Colors.white),
                                 fontWeight: FontWeight.w400), // 设置字体大小
                           ),
                         ],
@@ -848,7 +760,7 @@ class RewardsPage extends HookConsumerWidget {
                         "$point",
                         style: TextStyle(
                             fontSize: 20.0,
-                            color: ColorUtils.string2Color('#FDB429'),
+                            color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#FDB429'), darkColor: Colors.white),
                             fontWeight: FontWeight.w500), // 设置字体大小
                       ),
                     ],
@@ -859,60 +771,4 @@ class RewardsPage extends HookConsumerWidget {
       ),
     ).marginOnly(bottom: 12);
   }
-
-  @override
-  Widget build(BuildContext context, WidgetRef ref) {
-    final _vm = ref.read(rewardsVmProvider.notifier);
-    final state = ref.watch(rewardsVmProvider);
-    RewardsIndexEntity? list = state.list;
-    useEffect(() {
-      // 组件挂载时执行 - 执行接口请求
-      Future.microtask(() => _vm.initPageData());
-      return () {
-        // 组件卸载时执行
-        Log.d("property_news_page 组件卸载时执行");
-      };
-    }, []);
-    return Scaffold(
-      // appBar: MyAppBar.appBar(
-      //   context,
-      //   "Daily Login",
-      //   backgroundColor: ColorUtils.string2Color('#4161D0'),
-      // ),
-      body: Column(children: [
-        Expanded(
-          child: LoadStateLayout(
-            state: state.loadingState,
-            errorMessage: state.errorMessage,
-            errorRetry: () {
-              _vm.retryRequest();
-            },
-            successWidget: SingleChildScrollView(
-                scrollDirection: Axis.vertical,
-                physics: const BouncingScrollPhysics(),
-                clipBehavior: Clip.none,
-                child: Column(
-                  children: [
-                    _buildTop(context, ref, _vm, list)
-                        .paddingOnly(top: MediaQuery.of(context).padding.top),
-                    Container(
-                      transform: Matrix4.translationValues(0.0, -45.0, 0.0),
-                      child: Column(
-                        children: [
-                          _buildSearch(context, ref, _vm, list),
-                          _buildSwiper(context, ref, _vm, list),
-                          list?.points != 0
-                              ? _buildList(context, ref, _vm, list)
-                              : const SizedBox.shrink(),
-                          _buildHistory(context, ref, _vm, list),
-                        ],
-                      ), // 使用负数margin
-                    ).paddingOnly(left: 15, right: 15),
-                  ],
-                )),
-          ),
-        ),
-      ]).backgroundColor(ColorUtils.string2Color('#F2F3F6')),
-    );
-  }
 }

+ 1 - 1
packages/cpt_rewards/lib/modules/rewards/rewards_repository.dart

@@ -28,7 +28,7 @@ class RewardsRepository {
 
   RewardsRepository({required this.dioEngine});
 
-  Future<HttpResult<Object>> fetchPropertyNewsList(
+  Future<HttpResult<RewardsIndexEntity>> fetchPropertyNewsList(
     Map<String, dynamic>? data, {
     CancelToken? cancelToken,
   }) async {

+ 5 - 3
packages/cpt_rewards/lib/modules/rewards/rewards_state.dart

@@ -3,6 +3,8 @@
 import 'dart:convert';
 
 import 'package:domain/entity/rewards_index_entity.dart';
+import 'package:domain/entity/visitor_page_entity.dart';
+import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/load_state_layout.dart';
 
 class RewardsState {
@@ -14,8 +16,8 @@ class RewardsState {
   RewardsState({
     this.loadingState = LoadState.State_Loading,
     String? errorMessage,
-    RewardsIndexEntity? list
-  }) : list = list ?? RewardsIndexEntity();
+    this.list,
+  });
 
   RewardsState copyWith({
     LoadState? loadingState,
@@ -40,4 +42,4 @@ class RewardsState {
       list: map['list'] as RewardsIndexEntity,
     );
   }
-}
+}

+ 8 - 15
packages/cpt_rewards/lib/modules/rewards/rewards_vm.dart

@@ -19,8 +19,9 @@ class RewardsVm extends _$RewardsVm {
   // Refresh 控制器
   final EasyRefreshController refreshController = EasyRefreshController(
     controlFinishRefresh: true, //允许刷新
-    controlFinishLoad: true, //允许加载
+    controlFinishLoad: false, //允许加载
   );
+
   RewardsState initState() {
     return RewardsState(
       list: RewardsIndexEntity()
@@ -44,10 +45,10 @@ class RewardsVm extends _$RewardsVm {
   }
 
   // 上拉加载
-  Future onLoadData() async {
-    Log.d("----property_news_vm-----initListData");
-    getListData();
-  }
+  // Future onLoadData() async {
+  //   Log.d("----property_news_vm-----initListData");
+  //   getListData();
+  // }
 
 // 去新闻详情页
   void goNewsDetail(String item) {
@@ -61,11 +62,6 @@ class RewardsVm extends _$RewardsVm {
     getListData();
   }
 
-  //刷新页面状态
-  void changeLoadingState(LoadState loadState, String? errorMsg) {
-    state = state.copyWith(loadingState: loadState, errorMessage: errorMsg);
-  }
-
   // 获取list 列表数据
   void getListData<T>() async {
     Log.d("加载listData数据---------------start-----");
@@ -77,13 +73,10 @@ class RewardsVm extends _$RewardsVm {
       Log.d("请求完成结果------${result.data}");
       //校验成功失败
       if (result.isSuccess) {
-        state = state.copyWith(
-          list: result.data as RewardsIndexEntity,
-        );
-        changeLoadingState(LoadState.State_Success, null);
+        state = state.copyWith(list: result.data, loadingState: LoadState.State_Success);
       } else {
         String errorMessage = result.errorMsg!;
-        changeLoadingState(LoadState.State_Error, errorMessage);
+        state = state.copyWith(list: null, loadingState: LoadState.State_Error,errorMessage: errorMessage);
         ToastEngine.show(result.errorMsg ?? "Network Load Error");
       }
     } catch (e) {

+ 14 - 24
packages/cpt_rewards/lib/modules/rewards_address/rewards_address_page.dart

@@ -1,3 +1,4 @@
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
@@ -10,6 +11,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/shatter/picker_container.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:cs_resources/generated/assets.dart';
 
@@ -35,14 +37,11 @@ class RewardsAddressPage extends HookConsumerWidget {
         Column(
           crossAxisAlignment: CrossAxisAlignment.start,
           children: [
-            const Text(
+            Text(
               maxLines: 1, // 设置最大行数为2
               overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
               'Delibowl Group',
-              style: TextStyle(
-                  fontSize: 16.0,
-                  color: Colors.black,
-                  fontWeight: FontWeight.w500),
+              style: TextStyle(fontSize: 16.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
             ),
             Row(
               crossAxisAlignment: CrossAxisAlignment.center,
@@ -53,7 +52,7 @@ class RewardsAddressPage extends HookConsumerWidget {
                   width: 15,
                   height: 19,
                 ).marginOnly(right: 10),
-                const Expanded(
+                Expanded(
                   child: Text(
                     maxLines: 2, // 设置最大行数为2
                     overflow: TextOverflow.ellipsis,
@@ -61,7 +60,7 @@ class RewardsAddressPage extends HookConsumerWidget {
                     '176 Orchard Rd, #02-29/30 Song Fa Bak Kut Teh The Centrepoint, Singapore 238843',
                     style: TextStyle(
                         fontSize: 15.0,
-                        color: Color.fromARGB(255, 69, 33, 33),
+                        color: DarkThemeUtil.multiColors(context, Color.fromARGB(255, 69, 33, 33), darkColor: Colors.white),
                         fontWeight: FontWeight.w400),
                   ),
                 ),
@@ -72,16 +71,12 @@ class RewardsAddressPage extends HookConsumerWidget {
               decoration: BoxDecoration(
                 color: Colors.white,
                 borderRadius: const BorderRadius.all(Radius.circular(6.0)),
-                border: Border.all(
-                    color: ColorUtils.string2Color('#4161D0'), width: 1.0),
+                border: Border.all(color: context.appColors.textPrimary, width: 1.0),
               ),
               child: Center(
                 child: Text(
                   '+65 26593458',
-                  style: TextStyle(
-                      fontSize: 15.0,
-                      color: ColorUtils.string2Color('#4161D0'),
-                      fontWeight: FontWeight.w500),
+                  style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500),
                 ),
               ),
             ),
@@ -94,12 +89,10 @@ class RewardsAddressPage extends HookConsumerWidget {
   // listitem
   Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
     return Container(
-      decoration: const BoxDecoration(
-        color: Colors.white,
-        borderRadius: BorderRadius.all(Radius.circular(6.0)),
-        boxShadow: [
-          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-        ],
+      decoration: BoxDecoration(
+        color: context.appColors.whiteBG,
+        borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+        boxShadow: const [BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)],
       ),
       child: Column(
         children: [
@@ -138,7 +131,7 @@ class RewardsAddressPage extends HookConsumerWidget {
     return Scaffold(
       appBar: MyAppBar.appBar(
         context,
-        "Redeem Deal At",
+        S.current.redeem_deal_at,
         backgroundColor: context.appColors.whiteBG,
       ),
       body: Container(
@@ -156,10 +149,7 @@ class RewardsAddressPage extends HookConsumerWidget {
                   Log.d("----onRefresh");
                   _vm.refreshListData();
                 },
-                child: Container(
-                    color: ColorUtils.string2Color('#F2F3F6'),
-                    padding: const EdgeInsets.only(top: 15),
-                    child: _buildSaleList(context, ref, _vm)),
+                child: Container(color: context.appColors.backgroundDark, padding: const EdgeInsets.only(top: 15), child: _buildSaleList(context, ref, _vm)),
               ),
             )
           ],

+ 22 - 25
packages/cpt_rewards/lib/modules/rewards_code/rewards_code_page.dart

@@ -1,3 +1,4 @@
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
@@ -10,6 +11,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/shatter/picker_container.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:cs_resources/generated/assets.dart';
 
@@ -19,10 +21,12 @@ import './rewards_code_vm.dart';
 @RoutePage()
 class RewardsCodePage extends HookConsumerWidget {
   final int? code;
+
   const RewardsCodePage({Key? key, @PathParam('code') required this.code}) : super(key: key);
 
   //启动当前页面
-  static void startInstance({BuildContext? context,
+  static void startInstance({
+    BuildContext? context,
     int? code,
   }) {
     if (context != null) {
@@ -40,28 +44,25 @@ class RewardsCodePage extends HookConsumerWidget {
           crossAxisAlignment: CrossAxisAlignment.center,
           mainAxisAlignment: MainAxisAlignment.center,
           children: [
-            const Center(
+            Center(
               child: Text(
-                'SHOW THE VERIFICATION CODE TO YOUR MERCHANT',
+                S.current.show_verification_cap,
                 textAlign: TextAlign.center,
-                style: TextStyle(
-                    fontSize: 20.0,
-                    color: Colors.black,
-                    fontWeight: FontWeight.w500),
+                style: TextStyle(fontSize: 20.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
               ),
             ),
             Text(
-              'VERIFICATION CODE',
+              S.current.verification_code_cap,
               style: TextStyle(
                   fontSize: 18.0,
-                  color: ColorUtils.string2Color('#54638C'),
+                  color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'), darkColor: Colors.white),
                   fontWeight: FontWeight.w500),
             ).marginOnly(top: 35, bottom: 20),
             Text(
               '$codes',
               style: TextStyle(
                   fontSize: 36.0,
-                  color: ColorUtils.string2Color('#4161D0'),
+                  color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#4161D0'), darkColor: Colors.white),
                   fontWeight: FontWeight.w500),
             ),
           ],
@@ -75,13 +76,10 @@ class RewardsCodePage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
-            borderRadius: BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [
-              BoxShadow(
-                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-            ],
+          decoration: BoxDecoration(
+            color: context.appColors.whiteBG,
+            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: const [BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)],
           ),
           width: MediaQuery.of(context).size.width - 30,
           height: 250,
@@ -109,20 +107,19 @@ class RewardsCodePage extends HookConsumerWidget {
     return Scaffold(
       appBar: MyAppBar.appBar(
         context,
-        "Verification Code",
+        S.current.verification_code,
         backgroundColor: context.appColors.whiteBG,
       ),
       body: Container(
         child: Column(
           children: [
             Expanded(
-              child: 
-              EasyRefresh(
-                child: 
-                Container(
-                    color: ColorUtils.string2Color('#F2F3F6'),
-                    padding: const EdgeInsets.only(top: 15),
-                    child: _buildSaleList(context, ref, _vm)),
+              child: EasyRefresh(
+                child: Container(
+                  color: context.appColors.backgroundDark,
+                  padding: const EdgeInsets.only(top: 15),
+                  child: _buildSaleList(context, ref, _vm),
+                ),
               ),
             )
           ],

+ 3 - 3
packages/cpt_rewards/lib/modules/rewards_confirm/dialog/account_deactivation_dialog.dart

@@ -26,7 +26,7 @@ class AccountDeactivationDialog extends HookConsumerWidget {
       children: [
         Text(
           textAlign: TextAlign.center,
-          'Are you sure to spend $amount points to redeem goods?',
+          S.current.sure_redeem_goods(amount),
           style: const TextStyle(
               fontSize: 19.0, color: Colors.black, fontWeight: FontWeight.w500),
         ).paddingOnly(left: 40, right: 40)
@@ -55,7 +55,7 @@ class AccountDeactivationDialog extends HookConsumerWidget {
             children: [
               const SizedBox(width: 45),
               MyTextView(
-                'Points payment',
+                S.current.points_payment,
                 fontSize: 18,
                 textAlign: TextAlign.center,
                 isFontMedium: true,
@@ -96,7 +96,7 @@ class AccountDeactivationDialog extends HookConsumerWidget {
                           _vm.rewardBuy();
                         },
                         child: MyTextView(
-                          'Pay Now',
+                          S.current.pay_now,
                           fontSize: 16,
                           paddingTop: 13,
                           paddingBottom: 13,

+ 50 - 80
packages/cpt_rewards/lib/modules/rewards_confirm/rewards_confirm_page.dart

@@ -1,3 +1,4 @@
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:domain/entity/rewards_detail_entity.dart';
 import 'package:flutter/cupertino.dart';
@@ -14,6 +15,7 @@ import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/shatter/picker_container.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:cs_resources/generated/assets.dart';
 
@@ -23,8 +25,8 @@ import './rewards_confirm_vm.dart';
 @RoutePage()
 class RewardsConfirmPage extends HookConsumerWidget {
   final int? id;
-  const RewardsConfirmPage({Key? key, @PathParam('id') required this.id})
-      : super(key: key);
+
+  const RewardsConfirmPage({Key? key, @PathParam('id') required this.id}) : super(key: key);
 
   //启动当前页面
   static void startInstance({
@@ -38,20 +40,17 @@ class RewardsConfirmPage extends HookConsumerWidget {
     }
   }
 
-  // listitem
+  // list item
   Widget _buildSaleItem(BuildContext context, WidgetRef ref, _vm, detailInfo) {
     String title = detailInfo!.title ?? "";
     List? resources = detailInfo!.resources ?? [];
     return Column(
       children: [
         Container(
-            decoration: const BoxDecoration(
-              color: Colors.white,
-              borderRadius: BorderRadius.all(Radius.circular(6.0)),
-              boxShadow: [
-                BoxShadow(
-                    color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-              ],
+            decoration: BoxDecoration(
+              color: context.appColors.whiteBG,
+              borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+              boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
             ),
             width: MediaQuery.of(context).size.width - 30,
             // height: 420,
@@ -66,7 +65,7 @@ class RewardsConfirmPage extends HookConsumerWidget {
                         width: MediaQuery.of(context).size.width,
                         height: 150,
                       )
-                    : Container(),
+                    : const SizedBox.shrink(),
                 Column(
                   crossAxisAlignment: CrossAxisAlignment.start,
                   mainAxisAlignment: MainAxisAlignment.start,
@@ -75,10 +74,7 @@ class RewardsConfirmPage extends HookConsumerWidget {
                       maxLines: 1, // 设置最大行数为2
                       overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
                       title,
-                      style: const TextStyle(
-                          fontSize: 17.0,
-                          color: Colors.black,
-                          fontWeight: FontWeight.w500),
+                      style: TextStyle(fontSize: 17.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                     ),
                   ],
                 ).paddingOnly(left: 15, right: 15, top: 10, bottom: 30),
@@ -92,13 +88,10 @@ class RewardsConfirmPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
-            borderRadius: BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [
-              BoxShadow(
-                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-            ],
+          decoration: BoxDecoration(
+            color: context.appColors.whiteBG,
+            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
           ),
           width: MediaQuery.of(context).size.width - 30,
           child: Column(
@@ -115,11 +108,8 @@ class RewardsConfirmPage extends HookConsumerWidget {
                     height: 25,
                   ).marginOnly(right: 5),
                   Text(
-                    'Redeem Deal At',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#000000'),
-                        fontWeight: FontWeight.w500),
+                    S.current.redeem_deal_at,
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                   )
                 ],
               ),
@@ -133,7 +123,7 @@ class RewardsConfirmPage extends HookConsumerWidget {
                     overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
                     style: TextStyle(
                         fontSize: 15.0,
-                        color: ColorUtils.string2Color('#54638C'),
+                        color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'), darkColor: Colors.white),
                         fontWeight: FontWeight.w400),
                   ),
                 ],
@@ -152,13 +142,10 @@ class RewardsConfirmPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
+          decoration: BoxDecoration(
+            color: context.appColors.whiteBG,
             borderRadius: BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [
-              BoxShadow(
-                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-            ],
+            boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
           ),
           width: MediaQuery.of(context).size.width - 30,
           child: Column(
@@ -175,11 +162,8 @@ class RewardsConfirmPage extends HookConsumerWidget {
                     height: 15,
                   ).marginOnly(right: 10),
                   Text(
-                    'Redeem From',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#000000'),
-                        fontWeight: FontWeight.w500),
+                    S.current.redeem_from,
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                   )
                 ],
               ).marginOnly(bottom: 10),
@@ -190,7 +174,7 @@ class RewardsConfirmPage extends HookConsumerWidget {
                     redeemedDate,
                     style: TextStyle(
                         fontSize: 15.0,
-                        color: ColorUtils.string2Color('#54638C'),
+                        color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'), darkColor: Colors.white),
                         fontWeight: FontWeight.w400),
                   ),
                 ],
@@ -211,13 +195,10 @@ class RewardsConfirmPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
-            borderRadius: BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [
-              BoxShadow(
-                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-            ],
+          decoration: BoxDecoration(
+            color: context.appColors.whiteBG,
+            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
           ),
           width: MediaQuery.of(context).size.width - 30,
           child: Column(
@@ -228,16 +209,15 @@ class RewardsConfirmPage extends HookConsumerWidget {
                 crossAxisAlignment: CrossAxisAlignment.center,
                 children: [
                   Text(
-                    'Quantity:',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#333333'),
-                        fontWeight: FontWeight.w400),
+                    "${S.current.quantity}:",
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.tabTextUnSelectedPrimary, fontWeight: FontWeight.w400),
                   ),
                   Row(
                     children: [
-                      const MyAssetImage(
+                      DarkThemeUtil.multiImageColorFit(
+                        context,
                         Assets.rewardsRewardsJian,
+                        darkColor: Colors.white,
                         width: 21,
                         height: 21,
                       ).onTap(() {
@@ -245,13 +225,12 @@ class RewardsConfirmPage extends HookConsumerWidget {
                       }),
                       Text(
                         '$number',
-                        style: TextStyle(
-                            fontSize: 19.0,
-                            color: ColorUtils.string2Color('#333333'),
-                            fontWeight: FontWeight.w500),
+                        style: TextStyle(fontSize: 19.0, color: context.appColors.tabTextUnSelectedPrimary, fontWeight: FontWeight.w500),
                       ).marginOnly(left: 15, right: 15),
-                      const MyAssetImage(
+                      DarkThemeUtil.multiImageColorFit(
+                        context,
                         Assets.rewardsRewardsJia,
+                        darkColor: Colors.white,
                         width: 21,
                         height: 21,
                       ).onTap(() {
@@ -266,11 +245,8 @@ class RewardsConfirmPage extends HookConsumerWidget {
                 crossAxisAlignment: CrossAxisAlignment.center,
                 children: [
                   Text(
-                    'Points:',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#333333'),
-                        fontWeight: FontWeight.w400),
+                    '${S.current.points}:',
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.tabTextUnSelectedPrimary, fontWeight: FontWeight.w400),
                   ),
                   Row(
                     children: [
@@ -278,18 +254,15 @@ class RewardsConfirmPage extends HookConsumerWidget {
                         '$originalPoint',
                         style: TextStyle(
                             decoration: TextDecoration.lineThrough,
-                            decorationColor: ColorUtils.string2Color('#54638C'),
+                            decorationColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'), darkColor: Colors.white),
                             decorationStyle: TextDecorationStyle.solid,
                             fontSize: 14.0,
-                            color: ColorUtils.string2Color('#54638C'),
+                            color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'), darkColor: Colors.white),
                             fontWeight: FontWeight.w400),
                       ),
                       Text(
                         '$point',
-                        style: TextStyle(
-                            fontSize: 19.0,
-                            color: ColorUtils.string2Color('#333333'),
-                            fontWeight: FontWeight.w500),
+                        style: TextStyle(fontSize: 19.0, color: context.appColors.tabTextUnSelectedPrimary, fontWeight: FontWeight.w500),
                       ).marginOnly(left: 10),
                     ],
                   ),
@@ -300,11 +273,8 @@ class RewardsConfirmPage extends HookConsumerWidget {
                 crossAxisAlignment: CrossAxisAlignment.center,
                 children: [
                   Text(
-                    'Amount:',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#333333'),
-                        fontWeight: FontWeight.w400),
+                    '${S.current.amount}:',
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.tabTextUnSelectedPrimary, fontWeight: FontWeight.w400),
                   ),
                   Row(
                     children: [
@@ -312,7 +282,7 @@ class RewardsConfirmPage extends HookConsumerWidget {
                         '$amount',
                         style: TextStyle(
                             fontSize: 19.0,
-                            color: ColorUtils.string2Color('#4161D0'),
+                            color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#4161D0'), darkColor: Colors.white),
                             fontWeight: FontWeight.w500),
                       ),
                     ],
@@ -342,7 +312,7 @@ class RewardsConfirmPage extends HookConsumerWidget {
     return Scaffold(
       appBar: MyAppBar.appBar(
         context,
-        "Confirm Details",
+        S.current.confirm_details,
         backgroundColor: context.appColors.whiteBG,
       ),
       body: LoadStateLayout(
@@ -361,7 +331,7 @@ class RewardsConfirmPage extends HookConsumerWidget {
                       child: Column(
                         children: [
                           Container(
-                              color: ColorUtils.string2Color('#F2F3F6'),
+                              color: context.appColors.backgroundDark,
                               padding: const EdgeInsets.only(top: 15),
                               child: Column(
                                 children: [
@@ -375,21 +345,21 @@ class RewardsConfirmPage extends HookConsumerWidget {
                       ))),
               Container(
                 height: 50,
-                color: ColorUtils.string2Color('#4161D0'),
+                color: context.appColors.btnBgDefault,
                 child: Flex(
                   direction: Axis.horizontal,
                   children: [
                     Expanded(
                       flex: 1,
                       child: Container(
-                        color: ColorUtils.string2Color('#4161D0'),
+                        color: context.appColors.btnBgDefault,
                         height: 100,
                         child: Row(
                           mainAxisAlignment: MainAxisAlignment.center,
                           crossAxisAlignment: CrossAxisAlignment.center,
                           children: [
                             MyTextView(
-                              "Redeem",
+                              S.current.redeem,
                               fontSize: 16,
                               textColor: Colors.white,
                               isFontMedium: true,

+ 60 - 128
packages/cpt_rewards/lib/modules/rewards_detail/rewards_detail_page.dart

@@ -1,4 +1,5 @@
 import 'package:cpt_rewards/modules/rewards_confirm/rewards_confirm_page.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:domain/entity/rewards_detail_entity.dart';
 import 'package:flutter/cupertino.dart';
@@ -15,6 +16,7 @@ import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/shatter/picker_container.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:cs_resources/generated/assets.dart';
 
@@ -24,8 +26,8 @@ import './rewards_detail_vm.dart';
 @RoutePage()
 class RewardsDetailPage extends HookConsumerWidget {
   final int? id;
-  const RewardsDetailPage({Key? key, @PathParam('id') required this.id})
-      : super(key: key);
+
+  const RewardsDetailPage({Key? key, @PathParam('id') required this.id}) : super(key: key);
 
   //启动当前页面
   static void startInstance({
@@ -54,13 +56,10 @@ class RewardsDetailPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-            decoration: const BoxDecoration(
-              color: Colors.white,
+            decoration: BoxDecoration(
+              color: context.appColors.whiteBG,
               borderRadius: BorderRadius.all(Radius.circular(6.0)),
-              boxShadow: [
-                BoxShadow(
-                    color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-              ],
+              boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
             ),
             width: MediaQuery.of(context).size.width - 30,
             // height: 420,
@@ -82,46 +81,36 @@ class RewardsDetailPage extends HookConsumerWidget {
                       maxLines: 1, // 设置最大行数为2
                       overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
                       title,
-                      style: const TextStyle(
-                          fontSize: 16.0,
-                          color: Colors.black,
-                          fontWeight: FontWeight.w500),
+                      style: TextStyle(fontSize: 16.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                     ),
                     Text(
                       maxLines: 1, // 设置最大行数为2
                       overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
-                      'Pulished Date: $createdAt',
+                      '${S.current.published_date}: $createdAt',
                       style: TextStyle(
                           fontSize: 13.0,
-                          color: ColorUtils.string2Color('#808DAF'),
+                          color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#808DAF'), darkColor: Colors.white),
                           fontWeight: FontWeight.w400),
                     ).marginOnly(bottom: 5),
                     Row(
                       children: [
                         Text(
                           '$point',
-                          style: const TextStyle(
-                              fontSize: 19.0,
-                              color: Colors.black,
-                              fontWeight: FontWeight.w500),
+                          style: TextStyle(fontSize: 19.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                         ),
                         Text(
                           '$originalPoint',
                           style: TextStyle(
                               decoration: TextDecoration.lineThrough,
-                              decorationColor:
-                                  ColorUtils.string2Color('#808DAF'),
+                              decorationColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#808DAF'), darkColor: Colors.white),
                               decorationStyle: TextDecorationStyle.solid,
                               fontSize: 12.0,
                               color: ColorUtils.string2Color('#808DAF'),
                               fontWeight: FontWeight.w400),
                         ).marginOnly(left: 5, right: 5),
-                        const Text(
-                          'Points',
-                          style: TextStyle(
-                              fontSize: 13.0,
-                              color: Colors.black,
-                              fontWeight: FontWeight.w400),
+                        Text(
+                          S.current.points,
+                          style: TextStyle(fontSize: 13.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                         ),
                       ],
                     ),
@@ -129,7 +118,7 @@ class RewardsDetailPage extends HookConsumerWidget {
                       description,
                       style: TextStyle(
                           fontSize: 13.0,
-                          color: ColorUtils.string2Color('#808DAF'),
+                          color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#808DAF'), darkColor: Colors.white),
                           fontWeight: FontWeight.w400),
                     ).marginOnly(bottom: 10, top: 10),
                     Container(
@@ -164,8 +153,7 @@ class RewardsDetailPage extends HookConsumerWidget {
                             height: 28,
                             decoration: BoxDecoration(
                               color: ColorUtils.string2Color('#F2F3F6'),
-                              borderRadius:
-                                  const BorderRadius.all(Radius.circular(6.0)),
+                              borderRadius: const BorderRadius.all(Radius.circular(6.0)),
                             ),
                             child: Row(
                               mainAxisSize: MainAxisSize.min,
@@ -180,9 +168,7 @@ class RewardsDetailPage extends HookConsumerWidget {
                                 Text(
                                   maxLines: 1, // 设置最大行数为2
                                   overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
-                                  reservation
-                                      ? 'Reservation required'
-                                      : 'No Reservation Required',
+                                  reservation ? S.current.reservation_required : S.current.no_reservation_required,
                                   style: TextStyle(
                                       fontSize: 14.0,
                                       color: ColorUtils.string2Color('#808DAF'),
@@ -206,10 +192,7 @@ class RewardsDetailPage extends HookConsumerWidget {
           decoration: const BoxDecoration(
             color: Colors.white,
             borderRadius: BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [
-              BoxShadow(
-                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-            ],
+            boxShadow: [BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)],
           ),
           width: MediaQuery.of(context).size.width - 30,
           child: Column(
@@ -226,20 +209,16 @@ class RewardsDetailPage extends HookConsumerWidget {
                     height: 25,
                   ).marginOnly(right: 10),
                   Text(
-                    'Redeem Deal At',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#000000'),
-                        fontWeight: FontWeight.w500),
+                    S.current.redeem_deal_at,
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack   , fontWeight: FontWeight.w500),
                   )
                 ],
               ),
               Container(
                       height: 77,
                       decoration: BoxDecoration(
-                        color: ColorUtils.string2Color('#F2F3F6'),
-                        borderRadius:
-                            const BorderRadius.all(Radius.circular(6.0)),
+                        color:DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#F2F3F6'),darkColor: Colors.white),
+                        borderRadius: const BorderRadius.all(Radius.circular(6.0)),
                       ),
                       child: Row(
                         mainAxisSize: MainAxisSize.max,
@@ -258,19 +237,13 @@ class RewardsDetailPage extends HookConsumerWidget {
                                 maxLines: 1, // 设置最大行数为2
                                 overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
                                 'Delibowl Group',
-                                style: TextStyle(
-                                    fontSize: 15.0,
-                                    color: ColorUtils.string2Color('#54638C'),
-                                    fontWeight: FontWeight.w500),
+                                style: TextStyle(fontSize: 15.0, color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white), fontWeight: FontWeight.w500),
                               ).marginOnly(bottom: 8),
                               Text(
                                 maxLines: 1, // 设置最大行数为2
                                 overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
                                 '#01-136, SingPost Center, 408600',
-                                style: TextStyle(
-                                    fontSize: 14.0,
-                                    color: ColorUtils.string2Color('#54638C'),
-                                    fontWeight: FontWeight.w400),
+                                style: TextStyle(fontSize: 14.0, color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white), fontWeight: FontWeight.w400),
                               )
                             ],
                           ).paddingOnly(
@@ -285,10 +258,7 @@ class RewardsDetailPage extends HookConsumerWidget {
                 children: [
                   Text(
                     'Also redeemable in 1 more location',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#54638C'),
-                        fontWeight: FontWeight.w400),
+                    style: TextStyle(fontSize: 15.0, color:DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white), fontWeight: FontWeight.w400),
                   ),
                   const MyAssetImage(
                     Assets.rewardsRewardsRight,
@@ -309,13 +279,10 @@ class RewardsDetailPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
-            borderRadius: BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [
-              BoxShadow(
-                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-            ],
+          decoration:  BoxDecoration(
+            color:context.appColors.whiteBG ,
+            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: [BoxShadow(color: context.appColors.itemBGShadow )],
           ),
           width: MediaQuery.of(context).size.width - 30,
           child: Column(
@@ -333,10 +300,7 @@ class RewardsDetailPage extends HookConsumerWidget {
                   ).marginOnly(right: 10),
                   Text(
                     'What’s In The Package',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#000000'),
-                        fontWeight: FontWeight.w500),
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack  , fontWeight: FontWeight.w500),
                   )
                 ],
               ).marginOnly(bottom: 10),
@@ -345,10 +309,7 @@ class RewardsDetailPage extends HookConsumerWidget {
                 children: [
                   Text(
                     package,
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#54638C'),
-                        fontWeight: FontWeight.w400),
+                    style: TextStyle(fontSize: 15.0, color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white), fontWeight: FontWeight.w400),
                   ),
                 ],
               ),
@@ -364,13 +325,10 @@ class RewardsDetailPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
-            borderRadius: BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [
-              BoxShadow(
-                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-            ],
+          decoration:  BoxDecoration(
+            color:context.appColors.whiteBG   ,
+            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: [BoxShadow(color: context.appColors.itemBGShadow   )],
           ),
           width: MediaQuery.of(context).size.width - 30,
           child: Column(
@@ -387,11 +345,8 @@ class RewardsDetailPage extends HookConsumerWidget {
                     height: 25,
                   ).marginOnly(right: 10),
                   Text(
-                    'Redemption Notice',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#000000'),
-                        fontWeight: FontWeight.w500),
+                    S.current.redemption_notice,
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack   , fontWeight: FontWeight.w500),
                   )
                 ],
               ).marginOnly(bottom: 10),
@@ -400,10 +355,7 @@ class RewardsDetailPage extends HookConsumerWidget {
                 children: [
                   Text(
                     notice,
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#54638C'),
-                        fontWeight: FontWeight.w400),
+                    style: TextStyle(fontSize: 15.0, color:DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white), fontWeight: FontWeight.w400),
                   ),
                 ],
               ),
@@ -418,13 +370,10 @@ class RewardsDetailPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
+          decoration:  BoxDecoration(
+            color: context.appColors.whiteBG ,
             borderRadius: BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [
-              BoxShadow(
-                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-            ],
+            boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
           ),
           width: MediaQuery.of(context).size.width - 30,
           child: Column(
@@ -441,11 +390,8 @@ class RewardsDetailPage extends HookConsumerWidget {
                     height: 25,
                   ).marginOnly(right: 10),
                   Text(
-                    'Redemption Instructions',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#000000'),
-                        fontWeight: FontWeight.w500),
+                    S.current.redemption_instructions,
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack , fontWeight: FontWeight.w500),
                   )
                 ],
               ).marginOnly(bottom: 10),
@@ -453,11 +399,8 @@ class RewardsDetailPage extends HookConsumerWidget {
                 crossAxisAlignment: CrossAxisAlignment.start,
                 children: [
                   Text(
-                    'Reservation not required.Present your YY Circle Voucher (it’s under “Me”tab)At the outlet.',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#54638C'),
-                        fontWeight: FontWeight.w400),
+                    S.current.redemption_reservation_txt,
+                    style: TextStyle(fontSize: 15.0, color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white), fontWeight: FontWeight.w400),
                   ),
                 ],
               ),
@@ -468,19 +411,15 @@ class RewardsDetailPage extends HookConsumerWidget {
     ).marginOnly(left: 15, bottom: 15, right: 15);
   }
 
-  Widget _buildRedeemable(
-      BuildContext context, WidgetRef ref, _vm, detailInfo) {
+  Widget _buildRedeemable(BuildContext context, WidgetRef ref, _vm, detailInfo) {
     List? redeemable = detailInfo!.redeemable ?? [];
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
-            borderRadius: BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [
-              BoxShadow(
-                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-            ],
+          decoration:  BoxDecoration(
+            color: context.appColors.whiteBG    ,
+            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: [BoxShadow(color: context.appColors.itemBGShadow    )],
           ),
           width: MediaQuery.of(context).size.width - 30,
           child: Column(
@@ -497,11 +436,8 @@ class RewardsDetailPage extends HookConsumerWidget {
                     height: 25,
                   ).marginOnly(right: 10),
                   Text(
-                    'Redeemable On',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#000000'),
-                        fontWeight: FontWeight.w500),
+                    S.current.redeemable_on,
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack    , fontWeight: FontWeight.w500),
                   )
                 ],
               ).marginOnly(bottom: 10),
@@ -513,10 +449,7 @@ class RewardsDetailPage extends HookConsumerWidget {
                     final item = redeemable[index];
                     return Text(
                       '${item.day}: ${item.time}',
-                      style: TextStyle(
-                          fontSize: 15.0,
-                          color: ColorUtils.string2Color('#54638C'),
-                          fontWeight: FontWeight.w400),
+                      style: TextStyle(fontSize: 15.0, color:DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white), fontWeight: FontWeight.w400),
                     );
                   },
                 ),
@@ -544,7 +477,7 @@ class RewardsDetailPage extends HookConsumerWidget {
     return Scaffold(
       appBar: MyAppBar.appBar(
         context,
-        "Detail",
+        S.current.detail,
         backgroundColor: context.appColors.whiteBG,
       ),
       body: LoadStateLayout(
@@ -563,7 +496,7 @@ class RewardsDetailPage extends HookConsumerWidget {
                       child: Column(
                         children: [
                           Container(
-                              color: ColorUtils.string2Color('#F2F3F6'),
+                              color: context.appColors.backgroundDark,
                               padding: const EdgeInsets.only(top: 15),
                               child: Column(
                                 children: [
@@ -572,29 +505,28 @@ class RewardsDetailPage extends HookConsumerWidget {
                                   _buildPackage(context, ref, _vm, detailInfo),
                                   _buildNotice(context, ref, _vm, detailInfo),
                                   // _buildInstructions(context, ref, _vm),
-                                  _buildRedeemable(
-                                      context, ref, _vm, detailInfo),
+                                  _buildRedeemable(context, ref, _vm, detailInfo),
                                 ],
                               )),
                         ],
                       ))),
               Container(
                 height: 50,
-                color: ColorUtils.string2Color('#4161D0'),
+                color: context.appColors.btnBgDefault,
                 child: Flex(
                   direction: Axis.horizontal,
                   children: [
                     Expanded(
                       flex: 1,
                       child: Container(
-                        color: ColorUtils.string2Color('#4161D0'),
+                        color: context.appColors.btnBgDefault,
                         height: 100,
                         child: Row(
                           mainAxisAlignment: MainAxisAlignment.center,
                           crossAxisAlignment: CrossAxisAlignment.center,
                           children: [
                             MyTextView(
-                              "Redeem",
+                              S.current.redeem,
                               fontSize: 16,
                               textColor: Colors.white,
                               isFontMedium: true,

+ 9 - 6
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_earned/rewards_history_earned_page.dart

@@ -1,5 +1,7 @@
+import 'package:cpt_rewards/modules/rewards/rewards_page.dart';
 import 'package:cpt_rewards/modules/rewards_code/rewards_code_page.dart';
 import 'package:cpt_rewards/modules/rewards_redeem/rewards_redeem_page.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
@@ -10,6 +12,7 @@ import 'package:shared/utils/color_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_load_image.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:cs_resources/generated/assets.dart';
 
@@ -40,7 +43,7 @@ class RewardsHistoryEarnedPage extends HookConsumerWidget {
           border: Border(
               bottom: BorderSide(
         width: 1.0, // 底边边框的宽度
-        color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+        color: context.appColors.backgroundDark, // 底边边框的颜色
       ))),
       child: Row(
         crossAxisAlignment: CrossAxisAlignment.center,
@@ -54,14 +57,14 @@ class RewardsHistoryEarnedPage extends HookConsumerWidget {
                 shortDescription,
                 style: TextStyle(
                     fontSize: 15.0,
-                    color: ColorUtils.string2Color('#000000'),
+                    color: context.appColors.textBlack,
                     fontWeight: FontWeight.w500), // 设置字体大小
               ).marginOnly(bottom: 6),
               Text(
                 createdAt,
                 style: TextStyle(
                     fontSize: 13.0,
-                    color: ColorUtils.string2Color('#808DAF'),
+                    color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#808DAF'),darkColor: Colors.white),
                     fontWeight: FontWeight.w400), // 设置字体大小
               ),
             ],
@@ -70,7 +73,7 @@ class RewardsHistoryEarnedPage extends HookConsumerWidget {
             '$point',
             style: TextStyle(
                 fontSize: 20.0,
-                color: ColorUtils.string2Color('#FDB429'),
+                color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#FDB429'),darkColor: Colors.white),
                 fontWeight: FontWeight.w500), // 设置字体大小
           ),
         ],
@@ -105,7 +108,7 @@ class RewardsHistoryEarnedPage extends HookConsumerWidget {
           width: double.infinity,
           height: double.infinity,
           child: Container(
-              color: ColorUtils.string2Color('#F2F3F6'),
+              color: context.appColors.backgroundDark,
               padding: const EdgeInsets.only(top: 15),
               child: EasyRefresh(
               controller: vm.refreshController,
@@ -121,7 +124,7 @@ class RewardsHistoryEarnedPage extends HookConsumerWidget {
               },
               child:  Container(
                     decoration: BoxDecoration(
-                      color: Colors.white,
+                      color: context.appColors.whiteBG,
                       borderRadius: BorderRadius.circular(10),
                       boxShadow: const [
                         BoxShadow(

+ 10 - 17
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_page.dart

@@ -1,5 +1,7 @@
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
+
 // ignore: depend_on_referenced_packages
 import 'package:auto_route/auto_route.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
@@ -28,12 +30,11 @@ class RewardsHistoryPage extends HookConsumerWidget {
   }
 
   // 顶部tab 切换
-  Widget _buildTopSection(
-      BuildContext context, WidgetRef ref, _vm, tabsRouter) {
+  Widget _buildTopSection(BuildContext context, WidgetRef ref, _vm, tabsRouter) {
     final topSectionsData = _vm.topSectionsData;
     final currentTabIdx = tabsRouter.activeIndex;
     return Container(
-      color: ColorUtils.string2Color('#F2F3F6'),
+      color: context.appColors.backgroundDark,
       child: Center(
         child: Row(
           mainAxisAlignment: MainAxisAlignment.center,
@@ -41,25 +42,19 @@ class RewardsHistoryPage extends HookConsumerWidget {
           children: List.generate(topSectionsData.length, (index) {
             final item = topSectionsData[index];
             return Container(
-              width:
-                  MediaQuery.of(context).size.width / topSectionsData.length -
-                      45,
+              width: MediaQuery.of(context).size.width / topSectionsData.length - 45,
               height: 43,
-              padding: const EdgeInsets.only(
-                  top: 10, bottom: 10, left: 10, right: 10),
+              padding: const EdgeInsets.only(top: 10, bottom: 10, left: 10, right: 10),
               decoration: index == currentTabIdx
                   ? BoxDecoration(
-                      color: index == currentTabIdx
-                          ? context.appColors.btnBgDefault
-                          : ColorUtils.string2Color("#F2F3F6"),
+                      color: index == currentTabIdx ? context.appColors.btnBgDefault : context.appColors.backgroundDark,
                       borderRadius: BorderRadius.circular(20),
                       boxShadow: [
                         BoxShadow(
                           color: Colors.grey.withOpacity(0.5),
                           spreadRadius: 1,
                           blurRadius: 5,
-                          offset:
-                              const Offset(0, 2), // changes position of shadow
+                          offset: const Offset(0, 2), // changes position of shadow
                         ),
                       ],
                     )
@@ -74,9 +69,7 @@ class RewardsHistoryPage extends HookConsumerWidget {
                         fontSize: 16,
                         textAlign: TextAlign.center,
                         isFontMedium: true,
-                        textColor: index == currentTabIdx
-                            ? Colors.white
-                            : ColorUtils.string2Color("#000000"),
+                        textColor: index == currentTabIdx ? Colors.white : context.appColors.textBlack,
                       ),
                     ).onTap(
                       () {
@@ -100,7 +93,7 @@ class RewardsHistoryPage extends HookConsumerWidget {
     return Scaffold(
         appBar: MyAppBar.appBar(
           context,
-          "Points History",
+          S.current.points_history,
           backgroundColor: context.appColors.whiteBG,
         ),
         body: AutoTabsRouter.pageView(

+ 8 - 6
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_spent/rewards_history_spent_page.dart

@@ -1,4 +1,5 @@
 import 'package:cpt_rewards/modules/rewards_transaction/rewards_transaction_page.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
@@ -9,6 +10,7 @@ import 'package:shared/utils/color_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_load_image.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:cs_resources/generated/assets.dart';
 
@@ -39,7 +41,7 @@ class RewardsHistorySpentPage extends HookConsumerWidget {
           border: Border(
               bottom: BorderSide(
         width: 1.0, // 底边边框的宽度
-        color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+        color: context.appColors.backgroundDark, // 底边边框的颜色
       ))),
       child: Row(
         crossAxisAlignment: CrossAxisAlignment.center,
@@ -53,14 +55,14 @@ class RewardsHistorySpentPage extends HookConsumerWidget {
                 shortDescription,
                 style: TextStyle(
                     fontSize: 15.0,
-                    color: ColorUtils.string2Color('#000000'),
+                    color: context.appColors.textBlack,
                     fontWeight: FontWeight.w500), // 设置字体大小
               ).marginOnly(bottom: 6),
               Text(
                 createdAt,
                 style: TextStyle(
                     fontSize: 13.0,
-                    color: ColorUtils.string2Color('#808DAF'),
+                    color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#808DAF'),darkColor: Colors.white),
                     fontWeight: FontWeight.w400), // 设置字体大小
               ),
             ],
@@ -69,7 +71,7 @@ class RewardsHistorySpentPage extends HookConsumerWidget {
             '$point',
             style: TextStyle(
                 fontSize: 20.0,
-                color: ColorUtils.string2Color('#4161D0'),
+                color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#4161D0'),darkColor: Colors.white),
                 fontWeight: FontWeight.w500), // 设置字体大小
           ),
         ],
@@ -103,7 +105,7 @@ class RewardsHistorySpentPage extends HookConsumerWidget {
           width: double.infinity,
           height: double.infinity,
           child: Container(
-              color: ColorUtils.string2Color('#F2F3F6'),
+              color: context.appColors.backgroundDark,
               padding: const EdgeInsets.only(top: 15),
               child: EasyRefresh(
               controller: vm.refreshController,
@@ -119,7 +121,7 @@ class RewardsHistorySpentPage extends HookConsumerWidget {
               },
               child:  Container(
                     decoration: BoxDecoration(
-                      color: Colors.white,
+                      color: context.appColors.whiteBG,
                       borderRadius: BorderRadius.circular(10),
                       boxShadow: const [
                         BoxShadow(

+ 3 - 2
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_vm.dart

@@ -1,5 +1,6 @@
 
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
@@ -20,13 +21,13 @@ class RewardsHistoryVmState {
     this.curIdx = 0,
   }) : topSectionsData = topSectionsData?? [
     {
-      "title": "Earned Points",
+      "title": S.current.earned_points,
       "icon": Assets.propertyIoan,
       "pageStartInstanceFn": RewardsHistoryEarnedPage.startInstance,
       "page": const RewardsHistoryEarnedPage(),
     },
     {
-      "title": "Spent Points",
+      "title": S.current.spent_points,
       "icon": Assets.propertyNews,
       "pageStartInstanceFn": RewardsHistorySpentPage.startInstance,
       "page": const RewardsHistorySpentPage(),

+ 114 - 161
packages/cpt_rewards/lib/modules/rewards_home/rewards_home_page.dart

@@ -5,10 +5,14 @@ import 'package:cpt_rewards/modules/rewards_list/rewards_list_page.dart';
 import 'package:cpt_rewards/modules/rewards_my/rewards_my_page.dart';
 import 'package:cpt_rewards/modules/rewards_search/rewards_search_page.dart';
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:cs_resources/theme/theme_config.dart';
 import 'package:domain/entity/rewards_category_entity.dart';
 import 'package:domain/entity/rewards_home_entity.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
+import 'package:flutter/services.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:plugin_platform/engine/image/image_nine_grid.dart';
@@ -17,7 +21,9 @@ import 'package:shared/utils/color_utils.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/load_state_layout.dart';
+import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_load_image.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 
 import '../../../router/page/rewards_page_router.dart';
 import './rewards_home_vm.dart';
@@ -25,8 +31,8 @@ import './rewards_home_vm.dart';
 @RoutePage()
 class RewardsHomePage extends HookConsumerWidget {
   final int? points;
-  const RewardsHomePage({Key? key, @PathParam('points') required this.points})
-      : super(key: key);
+
+  const RewardsHomePage({Key? key, @PathParam('points') required this.points}) : super(key: key);
 
   //启动当前页面
   static void startInstance({
@@ -47,7 +53,7 @@ class RewardsHomePage extends HookConsumerWidget {
         decoration: BoxDecoration(
           border: Border(
               bottom: BorderSide(
-            color: ColorUtils.string2Color('#4161D0'), // 设置bottom边框的颜色
+            color: context.appColors.btnBgDefault, // 设置bottom边框的颜色
             width: 45.0, // 设置bottom边框的宽度
           )),
           borderRadius: const BorderRadius.only(
@@ -60,25 +66,14 @@ class RewardsHomePage extends HookConsumerWidget {
         child: Column(
           crossAxisAlignment: CrossAxisAlignment.start,
           children: [
-            const MyAssetImage(
-              Assets.rewardsRewardsBack,
-              width: 44,
-              height: 44,
-            ).onTap(() {
-              // backCallback
-              Navigator.pop(context);
-            }),
             Row(
               crossAxisAlignment: CrossAxisAlignment.center,
               mainAxisAlignment: MainAxisAlignment.center,
               children: [
                 Text(
-                  '$point Available Points',
-                  style: const TextStyle(
-                      fontSize: 18.0,
-                      color: Colors.white,
-                      fontWeight: FontWeight.w500), // 设置字体大小
-                ).paddingOnly(left: 10, top: 20, bottom: 18),
+                  '$point ${S.current.available_points}',
+                  style: const TextStyle(fontSize: 18.0, color: Colors.white, fontWeight: FontWeight.w500), // 设置字体大小
+                ).paddingOnly(left: 10, top: 0, bottom: 13),
               ],
             ),
             Row(
@@ -90,15 +85,10 @@ class RewardsHomePage extends HookConsumerWidget {
                     border: Border.all(color: Colors.white, width: 1), // 边框
                     borderRadius: BorderRadius.circular(8), // 圆角
                   ),
-                  child: const Text(
-                    'My Rewards',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: Colors.white,
-                        fontWeight: FontWeight.w400), // 设置字体大小
-                  )
-                      .paddingOnly(left: 10, top: 7, bottom: 7, right: 10)
-                      .onTap(() {
+                  child: Text(
+                    S.current.my_rewards,
+                    style: const TextStyle(fontSize: 15.0, color: Colors.white, fontWeight: FontWeight.w400), // 设置字体大小
+                  ).paddingOnly(left: 10, top: 7, bottom: 7, right: 10).onTap(() {
                     RewardsMyPage.startInstance();
                   }),
                 ),
@@ -132,17 +122,19 @@ class RewardsHomePage extends HookConsumerWidget {
             ).paddingOnly(left: 10)
           ],
         )
-            .paddingOnly(top: 15, left: 5, right: 15, bottom: 0)
-            .border(bottom: 0, color: ColorUtils.string2Color('#4161D0'))
-            .backgroundColor(ColorUtils.string2Color('#4161D0')));
+            .paddingOnly(top: 8, left: 5, right: 15, bottom: 8)
+            .border(bottom: 0, color: context.appColors.btnBgDefault)
+            .backgroundColor(context.appColors.btnBgDefault),
+    );
   }
 
   Widget _buildSearch(BuildContext context, WidgetRef ref, _vm) {
     // List itemsList = _vm.state.list.toList();
     return Container(
+      width: MediaQuery.of(context).size.width - 30,
       height: 50,
       decoration: BoxDecoration(
-        color: Colors.white,
+        color: context.appColors.whiteSecondBG,
         borderRadius: BorderRadius.circular(10),
       ),
       child: Row(
@@ -150,11 +142,8 @@ class RewardsHomePage extends HookConsumerWidget {
         mainAxisAlignment: MainAxisAlignment.spaceBetween,
         children: [
           Text(
-            'Search',
-            style: TextStyle(
-                fontSize: 15.0,
-                color: ColorUtils.string2Color('#C7CDE3'),
-                fontWeight: FontWeight.w500), // 设置字体大小
+            S.current.search,
+            style: TextStyle(fontSize: 15.0, color: ColorUtils.string2Color('#C7CDE3'), fontWeight: FontWeight.w500), // 设置字体大小
           ),
           const MyAssetImage(
             Assets.rewardsRewardsIndexSearch,
@@ -176,17 +165,15 @@ class RewardsHomePage extends HookConsumerWidget {
       transform: Matrix4.translationValues(0.0, -10.0, 0.0),
       // color: Colors.white,
       height: 110,
-      decoration: const BoxDecoration(
-        color: Colors.white,
+      decoration:  BoxDecoration(
+        color: context.appColors.whiteBG,
         borderRadius: const BorderRadius.only(
           topLeft: Radius.circular(10.0),
           topRight: Radius.circular(0.0),
           bottomLeft: Radius.circular(10.0),
           bottomRight: Radius.circular(0.0),
         ),
-        boxShadow: [
-          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-        ],
+        boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
       ),
       child: ClipRect(
           child: SingleChildScrollView(
@@ -209,10 +196,7 @@ class RewardsHomePage extends HookConsumerWidget {
                 ),
                 Text(
                   item['name']!,
-                  style: TextStyle(
-                      fontSize: 14.0,
-                      color: ColorUtils.string2Color('#000001'),
-                      fontWeight: FontWeight.w600), // 设置字体大小
+                  style: TextStyle(fontSize: 14.0, color: context.appColors.textBlack, fontWeight: FontWeight.w600), // 设置字体大小
                 ),
               ],
             ).marginOnly(right: 5).onTap(() {
@@ -235,17 +219,11 @@ class RewardsHomePage extends HookConsumerWidget {
                   children: [
                     Text(
                       list?['name'] ?? '',
-                      style: TextStyle(
-                          fontSize: 17.0,
-                          color: ColorUtils.string2Color('#000001'),
-                          fontWeight: FontWeight.w500), // 设置字体大小
+                      style: TextStyle(fontSize: 17.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
                     ),
                     Text(
-                      'See All',
-                      style: TextStyle(
-                          fontSize: 17.0,
-                          color: ColorUtils.string2Color('#4161D0'),
-                          fontWeight: FontWeight.w500), // 设置字体大小
+                      S.current.see_all,
+                      style: TextStyle(fontSize: 17.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
                     ).onTap(() {
                       RewardsListPage.startInstance();
                     }),
@@ -259,21 +237,14 @@ class RewardsHomePage extends HookConsumerWidget {
                       return Container(
                           width: MediaQuery.of(context).size.width / 2 - 25,
                           height: 155,
-                          decoration: const BoxDecoration(
-                            color: Colors.white,
-                            borderRadius:
-                                BorderRadius.all(Radius.circular(6.0)),
-                            boxShadow: [
-                              BoxShadow(
-                                  color: Color.fromRGBO(184, 191, 217, 0.3),
-                                  blurRadius: 6)
-                            ],
+                          decoration:  BoxDecoration(
+                            color: context.appColors.whiteBG,
+                            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+                            boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
                           ),
                           child: ClipRRect(
-                              borderRadius:
-                                  const BorderRadius.all(Radius.circular(6.0)),
-                              child: _buildItem(
-                              context, ref, _vm, hg, list['rewards'][index])));
+                              borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+                              child: _buildItem(context, ref, _vm, hg, list['rewards'][index])));
                     }))
               ],
             ),
@@ -290,18 +261,12 @@ class RewardsHomePage extends HookConsumerWidget {
             mainAxisAlignment: MainAxisAlignment.spaceBetween,
             children: [
               Text(
-                'Hottest',
-                style: TextStyle(
-                    fontSize: 17.0,
-                    color: ColorUtils.string2Color('#000001'),
-                    fontWeight: FontWeight.w500), // 设置字体大小
+                S.current.hottest,
+                style: TextStyle(fontSize: 17.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
               ),
               Text(
-                'See All',
-                style: TextStyle(
-                    fontSize: 17.0,
-                    color: ColorUtils.string2Color('#4161D0'),
-                    fontWeight: FontWeight.w500), // 设置字体大小
+                S.current.see_all,
+                style: TextStyle(fontSize: 17.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
               ).onTap(() {
                 RewardsListPage.startInstance();
               }),
@@ -315,14 +280,10 @@ class RewardsHomePage extends HookConsumerWidget {
                 return Container(
                     width: MediaQuery.of(context).size.width / 2 - 25,
                     height: 185,
-                    decoration: const BoxDecoration(
-                      color: Colors.white,
-                      borderRadius: BorderRadius.all(Radius.circular(6.0)),
-                      boxShadow: [
-                        BoxShadow(
-                            color: Color.fromRGBO(184, 191, 217, 0.3),
-                            blurRadius: 6)
-                      ],
+                    decoration:  BoxDecoration(
+                      color: context.appColors.whiteBG,
+                      borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+                      boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
                     ),
                     child: _buildItem(context, ref, _vm, hg, {}));
               }))
@@ -348,22 +309,16 @@ class RewardsHomePage extends HookConsumerWidget {
           crossAxisAlignment: CrossAxisAlignment.start,
           children: [
             Text(
-              maxLines: 2, // 设置最大行数为2
+              maxLines: 1, // 设置最大行数为2
               overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
               item?['name'] ?? '',
-              style: const TextStyle(
-                  fontSize: 15.0,
-                  color: Colors.black,
-                  fontWeight: FontWeight.w500),
+              style:  TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
             ).marginOnly(bottom: 5),
             Row(
               children: [
                 Text(
                   '$point',
-                  style: const TextStyle(
-                      fontSize: 18.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w500),
+                  style: TextStyle(fontSize: 18.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                 ),
                 Text(
                   '$originalPoint',
@@ -372,15 +327,12 @@ class RewardsHomePage extends HookConsumerWidget {
                       decorationColor: ColorUtils.string2Color('#808DAF'),
                       decorationStyle: TextDecorationStyle.solid,
                       fontSize: 13.0,
-                      color: ColorUtils.string2Color('#808DAF'),
+                      color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#808DAF'),darkColor: Colors.white),
                       fontWeight: FontWeight.w400),
                 ).marginOnly(left: 5, right: 5),
-                const Text(
-                  'Points',
-                  style: TextStyle(
-                      fontSize: 13.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w400),
+                Text(
+                  S.current.points,
+                  style: TextStyle(fontSize: 13.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                 ),
               ],
             )
@@ -403,17 +355,11 @@ class RewardsHomePage extends HookConsumerWidget {
                   children: [
                     Text(
                       list?['name'] ?? '',
-                      style: TextStyle(
-                          fontSize: 17.0,
-                          color: ColorUtils.string2Color('#000001'),
-                          fontWeight: FontWeight.w500), // 设置字体大小
+                      style: TextStyle(fontSize: 17.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
                     ),
                     Text(
-                      'See All',
-                      style: TextStyle(
-                          fontSize: 17.0,
-                          color: ColorUtils.string2Color('#4161D0'),
-                          fontWeight: FontWeight.w500), // 设置字体大小
+                      S.current.see_all,
+                      style: TextStyle(fontSize: 17.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
                     ).onTap(() {
                       RewardsListPage.startInstance();
                     }),
@@ -427,21 +373,13 @@ class RewardsHomePage extends HookConsumerWidget {
                       return Container(
                           width: MediaQuery.of(context).size.width / 2 - 25,
                           height: 155,
-                          decoration: const BoxDecoration(
-                            color: Colors.white,
-                            borderRadius:
-                                BorderRadius.all(Radius.circular(6.0)),
-                            boxShadow: [
-                              BoxShadow(
-                                  color: Color.fromRGBO(184, 191, 217, 0.3),
-                                  blurRadius: 6)
-                            ],
+                          decoration:  BoxDecoration(
+                            color: context.appColors.whiteBG,
+                            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+                            boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
                           ),
-                          child:ClipRRect(
-                              borderRadius:
-                                  const BorderRadius.all(Radius.circular(6.0)),
-                              child: _buildItem(
-                              context, ref, _vm, hg, list['rewards'][index])));
+                          child: ClipRRect(
+                              borderRadius: const BorderRadius.all(Radius.circular(6.0)), child: _buildItem(context, ref, _vm, hg, list['rewards'][index])));
                     }))
               ],
             ),
@@ -459,18 +397,12 @@ class RewardsHomePage extends HookConsumerWidget {
                   mainAxisAlignment: MainAxisAlignment.spaceBetween,
                   children: [
                     Text(
-                      'Best Offers in Singapore',
-                      style: TextStyle(
-                          fontSize: 17.0,
-                          color: ColorUtils.string2Color('#000001'),
-                          fontWeight: FontWeight.w500), // 设置字体大小
+                      S.current.best_offers_in_singapore,
+                      style: TextStyle(fontSize: 17.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
                     ),
                     Text(
-                      'See All',
-                      style: TextStyle(
-                          fontSize: 17.0,
-                          color: ColorUtils.string2Color('#4161D0'),
-                          fontWeight: FontWeight.w500), // 设置字体大小
+                      S.current.see_all,
+                      style: TextStyle(fontSize: 17.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
                     ),
                   ],
                 ).marginOnly(bottom: 15),
@@ -482,21 +414,13 @@ class RewardsHomePage extends HookConsumerWidget {
                       return Container(
                               // width: MediaQuery.of(context).size.width / 2 - 25,
                               height: 220,
-                              decoration: const BoxDecoration(
-                                color: Colors.white,
-                                borderRadius:
-                                    BorderRadius.all(Radius.circular(6.0)),
-                                boxShadow: [
-                                  BoxShadow(
-                                      color: Color.fromRGBO(184, 191, 217, 0.3),
-                                      blurRadius: 6)
-                                ],
+                              decoration:  BoxDecoration(
+                                color:context.appColors.whiteBG,
+                                borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+                                boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
                               ),
-                              child:ClipRRect(
-                              borderRadius:
-                                  const BorderRadius.all(Radius.circular(6.0)),
-                              child: _buildItem(context, ref, _vm, hg,
-                                  list['rewards'][index])))
+                              child: ClipRRect(
+                                  borderRadius: const BorderRadius.all(Radius.circular(6.0)), child: _buildItem(context, ref, _vm, hg, list['rewards'][index])))
                           .marginOnly(bottom: 13);
                     }))
               ],
@@ -518,7 +442,20 @@ class RewardsHomePage extends HookConsumerWidget {
       };
     }, []);
     return Scaffold(
-      // appBar: AppBar(title: Text("奖励")),
+      appBar: MyAppBar.appBar(
+        context,
+        "",
+        backIconPath: Assets.rewardsRewardsBack,
+        backIconWidth: 32.0,
+        backIconHeight: 32.0,
+        titleColor: Colors.white,
+        titleDarkColor: Colors.white,
+        showBackButton: true,
+        backgroundColor: context.appColors.btnBgDefault,
+        systemUiOverlayStyle: MediaQuery.of(context).platformBrightness == Brightness.dark
+            ? ThemeConfig.systemUiOverlayStyleDarkTheme
+            : ThemeConfig.systemUiOverlayStyleLightThemeWhite,
+      ),
       body: Column(children: [
         Expanded(
             child: LoadStateLayout(
@@ -534,25 +471,41 @@ class RewardsHomePage extends HookConsumerWidget {
               child: state.list.length > 0
                   ? Column(
                       children: [
-                        _buildTop(context, ref, _vm).paddingOnly(
-                            top: MediaQuery.of(context).padding.top),
-                        Container(
-                          transform: Matrix4.translationValues(0.0, -25.0, 0.0),
-                          child: _buildSearch(context, ref, _vm), // 使用负数margin
-                        ).paddingOnly(left: 15, right: 15),
+                        Stack(clipBehavior: Clip.none, children: <Widget>[
+                          _buildTop(context, ref, _vm),
+//                                               GestureDetector(
+//                                                   onTap: () {
+//                                                     print('第二个元素被点击'); // 这个会被触发。
+//                                                   },
+//                                                   child:Container(
+// transform:Matrix4.translationValues(0.0,210.0,0.0),child: _buildSearch(context,ref,_vm)//使用负数
+// ).paddingOnly(left:15,right:15))
+                          // Container(
+                          //   // transform: Matrix4.translationValues(0.0, -25.0, 0.0),
+                          //   child: _buildSearch(context, ref, _vm), // 使用负数margin
+                          // ).paddingOnly(left: 15, right: 15),
+                          Positioned(
+                            // 通过 Positioned 来确保它在红色容器的上方。
+                            left: 0, // 根据需要调整位置。
+                            bottom: -12, // 根据需要调整位置。
+                            child: GestureDetector(
+                              onTap: () {
+                                RewardsSearchPage.startInstance();
+                              },
+                              child: _buildSearch(context, ref, _vm),
+                            ).paddingOnly(left: 15, right: 15),
+                          ),
+                        ]).paddingOnly(bottom: 42),
                         _buildSwiper(context, ref, _vm),
-                        _buildRecommend(context, ref, _vm, state.list![0])
-                            .marginOnly(bottom: 15),
+                        _buildRecommend(context, ref, _vm, state.list![0]).marginOnly(bottom: 15),
                         // _buildHottest(context, ref, _vm).marginOnly(bottom: 15),
-                        _buildFood(context, ref, _vm, state.list![2])
-                            .marginOnly(bottom: 15),
-                        _buildBest(context, ref, _vm, state.list![1])
-                            .marginOnly(bottom: 15),
+                        _buildFood(context, ref, _vm, state.list![2]).marginOnly(bottom: 15),
+                        _buildBest(context, ref, _vm, state.list![1]).marginOnly(bottom: 15),
                       ],
                     )
                   : const Column()),
         )),
-      ]).backgroundColor(ColorUtils.string2Color('#F2F3F6')),
+      ]).backgroundColor(context.appColors.backgroundDark),
     );
   }
 }

+ 40 - 116
packages/cpt_rewards/lib/modules/rewards_list/rewards_list_page.dart

@@ -14,6 +14,7 @@ import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/shatter/picker_container.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:cs_resources/generated/assets.dart';
 
@@ -51,19 +52,13 @@ class RewardsListPage extends HookConsumerWidget {
               maxLines: 1, // 设置最大行数为2
               overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
               item?['name'] ?? '',
-              style: const TextStyle(
-                  fontSize: 16.0,
-                  color: Colors.black,
-                  fontWeight: FontWeight.w500),
+              style: TextStyle(fontSize: 16.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
             ).marginOnly(bottom: 5, top: 10).paddingOnly(left: 20, right: 20),
             Row(
               children: [
                 Text(
                   '$point',
-                  style: const TextStyle(
-                      fontSize: 19.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w500),
+                  style: TextStyle(fontSize: 19.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                 ),
                 Text(
                   '$originalPoint',
@@ -75,12 +70,9 @@ class RewardsListPage extends HookConsumerWidget {
                       color: ColorUtils.string2Color('#000000'),
                       fontWeight: FontWeight.w400),
                 ).marginOnly(left: 5, right: 5),
-                const Text(
+                Text(
                   'Points',
-                  style: TextStyle(
-                      fontSize: 13.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w400),
+                  style: TextStyle(fontSize: 13.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                 ),
               ],
             ).paddingOnly(left: 20, right: 20),
@@ -95,12 +87,10 @@ class RewardsListPage extends HookConsumerWidget {
   // listitem
   Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
     return Container(
-      decoration: const BoxDecoration(
-        color: Colors.white,
-        borderRadius: BorderRadius.all(Radius.circular(6.0)),
-        boxShadow: [
-          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-        ],
+      decoration: BoxDecoration(
+        color: context.appColors.whiteBG,
+        borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+        boxShadow: const [BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)],
       ),
       child: Column(
         children: [
@@ -112,10 +102,7 @@ class RewardsListPage extends HookConsumerWidget {
               crossAxisAlignment: CrossAxisAlignment.start,
               mainAxisAlignment: MainAxisAlignment.start,
               children: [
-                ClipRRect(
-                              borderRadius:
-                                  const BorderRadius.all(Radius.circular(6.0)),
-                              child:_buildItemLeftSection(context, ref, item, _vm))
+                ClipRRect(borderRadius: const BorderRadius.all(Radius.circular(6.0)), child: _buildItemLeftSection(context, ref, item, _vm))
                 // .marginOnly(bottom: 5),
               ],
             ),
@@ -140,12 +127,10 @@ class RewardsListPage extends HookConsumerWidget {
     final state = ref.watch(rewardsListVmProvider);
     return Container(
       height: 55,
-      decoration: const BoxDecoration(
-        color: Colors.white,
-        borderRadius: BorderRadius.all(Radius.circular(6.0)),
-        boxShadow: [
-          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-        ],
+      decoration: BoxDecoration(
+        color: context.appColors.whiteBG,
+        borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+        boxShadow: const [BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)],
       ),
       child: Row(
         children: [
@@ -169,16 +154,9 @@ class RewardsListPage extends HookConsumerWidget {
                 children: [
                   Text(
                     state.category_name!,
-                    style: const TextStyle(
-                        fontSize: 15.0,
-                        color: Colors.black,
-                        fontWeight: FontWeight.w500), // 设置字体大小
-                  ),
-                  const MyAssetImage(
-                    Assets.rewardsRewardsIconDomn,
-                    width: 12,
-                    height: 7,
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
                   ),
+                  DarkThemeUtil.multiImageColorFit(context, Assets.rewardsRewardsIconDomn, width: 12, height: 7, darkColor: Colors.white),
                 ],
               ).onTap(() {
                 // _vm.doDeleteAccountAll(context);
@@ -198,22 +176,15 @@ class RewardsListPage extends HookConsumerWidget {
                   //     ),
                   //   ],
                   // )
-                  const Row(
+                  Row(
                 mainAxisAlignment: MainAxisAlignment.spaceBetween,
                 crossAxisAlignment: CrossAxisAlignment.center,
                 children: [
                   Text(
                     'Popularity',
-                    style: const TextStyle(
-                        fontSize: 15.0,
-                        color: Colors.black,
-                        fontWeight: FontWeight.w500), // 设置字体大小
-                  ),
-                  MyAssetImage(
-                    Assets.rewardsRewardsIconDomn,
-                    width: 12,
-                    height: 7,
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
                   ),
+                  DarkThemeUtil.multiImageColorFit(context, Assets.rewardsRewardsIconDomn, width: 12, height: 7, darkColor: Colors.white),
                 ],
               ).onTap(() {
                 // 去详情
@@ -222,9 +193,7 @@ class RewardsListPage extends HookConsumerWidget {
               })).paddingOnly(left: 15, right: 15)
         ],
       ),
-    )
-        .marginOnly(top: 12, left: 15, right: 15)
-        .backgroundColor(ColorUtils.string2Color('#F2F3F6'));
+    ).marginOnly(top: 12, left: 15, right: 15).backgroundColor(context.appColors.backgroundDark);
   }
 
   @override
@@ -262,7 +231,7 @@ class RewardsListPage extends HookConsumerWidget {
                 vm.onRefresh();
               },
               child: Container(
-                color: ColorUtils.string2Color('#F2F3F6'),
+                color: context.appColors.backgroundDark,
                 padding: const EdgeInsets.only(top: 15),
                 child: LoadStateLayout(
                   state: state.loadingState,
@@ -316,10 +285,7 @@ class RewardsListPage extends HookConsumerWidget {
                             itemsList[index]['name'],
                             style: TextStyle(
                                 fontSize: 16.0,
-                                color:
-                                    itemsList[index]['id'] == state.category_id
-                                        ? ColorUtils.string2Color('#FF5E75')
-                                        : ColorUtils.string2Color('#000000'),
+                                color: itemsList[index]['id'] == state.category_id ? ColorUtils.string2Color('#FF5E75') : ColorUtils.string2Color('#000000'),
                                 fontWeight: FontWeight.w400),
                           ),
                         ],
@@ -374,10 +340,7 @@ class RewardsListPage extends HookConsumerWidget {
                         Text(
                           textAlign: TextAlign.center,
                           'Sort by',
-                          style: TextStyle(
-                              fontSize: 16.0,
-                              color: ColorUtils.string2Color('#767676'),
-                              fontWeight: FontWeight.w500),
+                          style: TextStyle(fontSize: 16.0, color: ColorUtils.string2Color('#767676'), fontWeight: FontWeight.w500),
                         ),
                       ],
                     ).paddingOnly(left: 15, right: 15),
@@ -390,8 +353,7 @@ class RewardsListPage extends HookConsumerWidget {
                               border: Border(
                                   bottom: BorderSide(
                             width: 1.0, // 底边边框的宽度
-                            color:
-                                ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+                            color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
                           ))),
                           child: Row(
                             crossAxisAlignment: CrossAxisAlignment.center,
@@ -408,10 +370,7 @@ class RewardsListPage extends HookConsumerWidget {
                                     'Latest',
                                     style: TextStyle(
                                         fontSize: 16.0,
-                                        color: sortBy == "created_at"
-                                            ? ColorUtils.string2Color('#FF5E75')
-                                            : ColorUtils.string2Color(
-                                                '#000000'),
+                                        color: sortBy == "created_at" ? ColorUtils.string2Color('#FF5E75') : ColorUtils.string2Color('#000000'),
                                         fontWeight: FontWeight.w400),
                                   ),
                                 ],
@@ -436,8 +395,7 @@ class RewardsListPage extends HookConsumerWidget {
                               border: Border(
                                   bottom: BorderSide(
                             width: 1.0, // 底边边框的宽度
-                            color:
-                                ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+                            color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
                           ))),
                           child: Row(
                             crossAxisAlignment: CrossAxisAlignment.center,
@@ -454,10 +412,7 @@ class RewardsListPage extends HookConsumerWidget {
                                     'Popularity',
                                     style: TextStyle(
                                         fontSize: 16.0,
-                                        color: sortBy == "clicks_count"
-                                            ? ColorUtils.string2Color('#FF5E75')
-                                            : ColorUtils.string2Color(
-                                                '#000000'),
+                                        color: sortBy == "clicks_count" ? ColorUtils.string2Color('#FF5E75') : ColorUtils.string2Color('#000000'),
                                         fontWeight: FontWeight.w400),
                                   ),
                                 ],
@@ -482,8 +437,7 @@ class RewardsListPage extends HookConsumerWidget {
                               border: Border(
                                   bottom: BorderSide(
                             width: 1.0, // 底边边框的宽度
-                            color:
-                                ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+                            color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
                           ))),
                           child: Row(
                             crossAxisAlignment: CrossAxisAlignment.center,
@@ -500,10 +454,7 @@ class RewardsListPage extends HookConsumerWidget {
                                     'Low to High Points',
                                     style: TextStyle(
                                         fontSize: 16.0,
-                                        color: sort == "asc"
-                                            ? ColorUtils.string2Color('#FF5E75')
-                                            : ColorUtils.string2Color(
-                                                '#000000'),
+                                        color: sort == "asc" ? ColorUtils.string2Color('#FF5E75') : ColorUtils.string2Color('#000000'),
                                         fontWeight: FontWeight.w400),
                                   ),
                                 ],
@@ -528,8 +479,7 @@ class RewardsListPage extends HookConsumerWidget {
                               border: Border(
                                   bottom: BorderSide(
                             width: 1.0, // 底边边框的宽度
-                            color:
-                                ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+                            color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
                           ))),
                           child: Row(
                             crossAxisAlignment: CrossAxisAlignment.center,
@@ -546,10 +496,7 @@ class RewardsListPage extends HookConsumerWidget {
                                     'High to Low Points',
                                     style: TextStyle(
                                         fontSize: 16.0,
-                                        color: sort == "desc"
-                                            ? ColorUtils.string2Color('#FF5E75')
-                                            : ColorUtils.string2Color(
-                                                '#000000'),
+                                        color: sort == "desc" ? ColorUtils.string2Color('#FF5E75') : ColorUtils.string2Color('#000000'),
                                         fontWeight: FontWeight.w400),
                                   ),
                                 ],
@@ -580,10 +527,7 @@ class RewardsListPage extends HookConsumerWidget {
                         Text(
                           textAlign: TextAlign.center,
                           'Filter By',
-                          style: TextStyle(
-                              fontSize: 16.0,
-                              color: ColorUtils.string2Color('#767676'),
-                              fontWeight: FontWeight.w500),
+                          style: TextStyle(fontSize: 16.0, color: ColorUtils.string2Color('#767676'), fontWeight: FontWeight.w500),
                         ),
                       ],
                     ).paddingOnly(left: 15, right: 15),
@@ -594,44 +538,28 @@ class RewardsListPage extends HookConsumerWidget {
                     children: [
                       Text(
                         '$point_min',
-                        style: TextStyle(
-                            fontSize: 16.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w400),
+                        style: TextStyle(fontSize: 16.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400),
                       ).marginOnly(right: 3),
                       Text(
                         'points',
-                        style: TextStyle(
-                            fontSize: 16.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w400),
+                        style: TextStyle(fontSize: 16.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400),
                       ).marginOnly(right: 3),
                       Text(
                         '-',
-                        style: TextStyle(
-                            fontSize: 16.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w400),
+                        style: TextStyle(fontSize: 16.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400),
                       ).marginOnly(right: 3),
                       Text(
                         '$point_max',
-                        style: TextStyle(
-                            fontSize: 16.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w400),
+                        style: TextStyle(fontSize: 16.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400),
                       ).marginOnly(right: 3),
                       Text(
                         'points',
-                        style: TextStyle(
-                            fontSize: 16.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w400),
+                        style: TextStyle(fontSize: 16.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400),
                       ).marginOnly(right: 3),
                     ],
                   ).paddingOnly(left: 15, right: 15, top: 20),
                   RangeSlider(
-                    values: RangeValues(
-                        point_min.toDouble(), point_max.toDouble()), // 初始化范围
+                    values: RangeValues(point_min.toDouble(), point_max.toDouble()), // 初始化范围
                     min: 0, // 最小值
                     max: 100, // 最大值
                     onChanged: (RangeValues values) {
@@ -640,8 +568,7 @@ class RewardsListPage extends HookConsumerWidget {
                         point_max = values.end.toInt();
                         _vm.rangeSliderChanged(values);
                         // 处理范围改变事件
-                        print(
-                            'Selected range: ${values.start} to ${values.end}');
+                        print('Selected range: ${values.start} to ${values.end}');
                       });
                     },
                   ).marginOnly(top: 5),
@@ -650,10 +577,7 @@ class RewardsListPage extends HookConsumerWidget {
                       transform: Matrix4.translationValues(-20.0, 0.0, 0.0),
                       child: Text(
                         'Only show rewards I can redeem',
-                        style: TextStyle(
-                            fontSize: 14.0,
-                            color: ColorUtils.string2Color('#767676'),
-                            fontWeight: FontWeight.w400),
+                        style: TextStyle(fontSize: 14.0, color: ColorUtils.string2Color('#767676'), fontWeight: FontWeight.w400),
                       ),
                     ),
                     controlAffinity: ListTileControlAffinity.leading,

+ 23 - 45
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_active/rewards_my_active_page.dart

@@ -1,5 +1,7 @@
 import 'package:cpt_rewards/modules/rewards_code/rewards_code_page.dart';
 import 'package:cpt_rewards/modules/rewards_redeem/rewards_redeem_page.dart';
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
@@ -48,36 +50,27 @@ class RewardsMyActivePage extends HookConsumerWidget {
               maxLines: 1, // 设置最大行数为2
               overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
               title,
-              style: const TextStyle(
-                  fontSize: 16.0,
-                  color: Colors.black,
-                  fontWeight: FontWeight.w500),
+              style: TextStyle(fontSize: 16.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
             ),
             Row(
               children: [
                 Text(
                   '$point',
-                  style: const TextStyle(
-                      fontSize: 19.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w500),
+                  style: TextStyle(fontSize: 19.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                 ),
                 Text(
                   '$originalPoint',
                   style: TextStyle(
                       decoration: TextDecoration.lineThrough,
-                      decorationColor: ColorUtils.string2Color('#000000'),
+                      decorationColor: context.appColors.textBlack  ,
                       decorationStyle: TextDecorationStyle.solid,
                       fontSize: 12.0,
-                      color: ColorUtils.string2Color('#000000'),
+                      color: context.appColors.textBlack  ,
                       fontWeight: FontWeight.w400),
                 ).marginOnly(left: 5, right: 5),
-                const Text(
-                  'Points',
-                  style: TextStyle(
-                      fontSize: 13.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w400),
+                Text(
+                  S.current.points,
+                  style:  TextStyle(fontSize: 13.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                 ),
               ],
             ),
@@ -91,39 +84,30 @@ class RewardsMyActivePage extends HookConsumerWidget {
                       width: 15,
                       height: 15,
                     ),
-                    const Text(
-                      'Redeem From:',
-                      style: TextStyle(
-                          fontSize: 13.0,
-                          color: Colors.black,
-                          fontWeight: FontWeight.w400),
+                    Text(
+                      '${S.current.redeem_from}:',
+                      style:  TextStyle(fontSize: 13.0, color:context.appColors.textBlack  , fontWeight: FontWeight.w400),
                     ).marginOnly(left: 6)
                   ],
                 ),
                 Text(
                   '$redeemedDate',
-                  style: const TextStyle(
-                      fontSize: 13.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w400),
+                  style:  TextStyle(fontSize: 13.0, color: context.appColors.textBlack  , fontWeight: FontWeight.w400),
                 )
               ],
             ),
             Container(
                 height: 43,
                 decoration: BoxDecoration(
-                  color: ColorUtils.string2Color('#4161D0'),
+                  color: context.appColors.btnBgDefaultDark,
                   borderRadius: BorderRadius.circular(8), // 圆角
                 ),
                 child: Expanded(
                     child: Container(
                         alignment: Alignment.center,
                         child: Text(
-                          'Redeem Now',
-                          style: TextStyle(
-                              fontSize: 15.0,
-                              color: ColorUtils.string2Color('#FFFFFF'),
-                              fontWeight: FontWeight.w500),
+                          S.current.redeem_now,
+                          style: const TextStyle(fontSize: 15.0, color: Colors.white, fontWeight: FontWeight.w500),
                         )))).marginOnly(top: 10, bottom: 10).onTap(() {
               RewardsCodePage.startInstance(code: code);
             }),
@@ -140,16 +124,12 @@ class RewardsMyActivePage extends HookConsumerWidget {
     });
   }
 
-  Widget _buildItemRightSection(
-      BuildContext context, WidgetRef ref, item, _vm) {
+  Widget _buildItemRightSection(BuildContext context, WidgetRef ref, item, _vm) {
     return Container(
       // color: Colors.green,
       child: Text(
         item['price'],
-        style: const TextStyle(
-            fontSize: 14.0,
-            color: Colors.black,
-            fontWeight: FontWeight.w400), // 设置字体大小
+        style: const TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w400), // 设置字体大小
       ),
     );
   }
@@ -157,12 +137,10 @@ class RewardsMyActivePage extends HookConsumerWidget {
   // listitem
   Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
     return Container(
-      decoration: const BoxDecoration(
-        color: Colors.white,
-        borderRadius: BorderRadius.all(Radius.circular(6.0)),
-        boxShadow: [
-          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-        ],
+      decoration: BoxDecoration(
+        color: context.appColors.whiteBG,
+        borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+        boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
       ),
       child: Column(
         children: [
@@ -226,7 +204,7 @@ class RewardsMyActivePage extends HookConsumerWidget {
                 vm.onRefresh();
               },
               child: Container(
-                color: ColorUtils.string2Color('#F2F3F6'),
+                color: context.appColors.backgroundDark,
                 padding: const EdgeInsets.only(top: 15),
                 child: LoadStateLayout(
                   state: state.loadingState,

+ 18 - 33
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_expired/rewards_my_expired_page.dart

@@ -1,4 +1,6 @@
 import 'package:cpt_rewards/modules/rewards_transaction/rewards_transaction_page.dart';
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
@@ -46,36 +48,27 @@ class RewardsMyExpiredPage extends HookConsumerWidget {
               maxLines: 1, // 设置最大行数为2
               overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
               title,
-              style: const TextStyle(
-                  fontSize: 16.0,
-                  color: Colors.black,
-                  fontWeight: FontWeight.w500),
+              style: TextStyle(fontSize: 16.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
             ),
             Row(
               children: [
                 Text(
                   '$point',
-                  style: const TextStyle(
-                      fontSize: 19.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w500),
+                  style: TextStyle(fontSize: 19.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                 ),
                 Text(
                   '$originalPoint',
                   style: TextStyle(
                       decoration: TextDecoration.lineThrough,
-                      decorationColor: ColorUtils.string2Color('#000000'),
+                      decorationColor: context.appColors.textBlack,
                       decorationStyle: TextDecorationStyle.solid,
                       fontSize: 12.0,
-                      color: ColorUtils.string2Color('#000000'),
+                      color: context.appColors.textBlack,
                       fontWeight: FontWeight.w400),
                 ).marginOnly(left: 5, right: 5),
-                const Text(
-                  'Points',
-                  style: TextStyle(
-                      fontSize: 13.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w400),
+                Text(
+                  S.current.points,
+                  style: TextStyle(fontSize: 13.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                 ),
               ],
             ),
@@ -89,21 +82,15 @@ class RewardsMyExpiredPage extends HookConsumerWidget {
                       width: 15,
                       height: 15,
                     ),
-                    const Text(
-                      'Redeem From:',
-                      style: TextStyle(
-                          fontSize: 13.0,
-                          color: Colors.black,
-                          fontWeight: FontWeight.w400),
+                    Text(
+                      '${S.current.redeem_from}:',
+                      style: TextStyle(fontSize: 13.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                     ).marginOnly(left: 6)
                   ],
                 ),
                 Text(
                   '$redeemedDate',
-                  style: const TextStyle(
-                      fontSize: 13.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w400),
+                  style: TextStyle(fontSize: 13.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                 )
               ],
             ),
@@ -124,12 +111,10 @@ class RewardsMyExpiredPage extends HookConsumerWidget {
   // listitem
   Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
     return Container(
-      decoration: const BoxDecoration(
-        color: Colors.white,
-        borderRadius: BorderRadius.all(Radius.circular(6.0)),
-        boxShadow: [
-          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-        ],
+      decoration: BoxDecoration(
+        color: context.appColors.whiteBG,
+        borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+        boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
       ),
       child: Column(
         children: [
@@ -192,7 +177,7 @@ class RewardsMyExpiredPage extends HookConsumerWidget {
                 vm.onRefresh();
               },
               child: Container(
-                color: ColorUtils.string2Color('#F2F3F6'),
+                color: context.appColors.backgroundDark,
                 padding: const EdgeInsets.only(top: 15),
                 child: LoadStateLayout(
                   state: state.loadingState,

+ 9 - 20
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_page.dart

@@ -1,12 +1,10 @@
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
-// ignore: depend_on_referenced_packages
 import 'package:auto_route/auto_route.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:router/ext/auto_router_extensions.dart';
 import 'package:shared/utils/color_utils.dart';
-import 'package:shared/utils/log_utils.dart';
-import 'package:widgets/my_load_image.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
@@ -28,12 +26,11 @@ class RewardsMyPage extends HookConsumerWidget {
   }
 
   // 顶部tab 切换
-  Widget _buildTopSection(
-      BuildContext context, WidgetRef ref, _vm, tabsRouter) {
+  Widget _buildTopSection(BuildContext context, WidgetRef ref, _vm, tabsRouter) {
     final topSectionsData = _vm.topSectionsData;
     final currentTabIdx = tabsRouter.activeIndex;
     return Container(
-      color: Colors.white,
+      color: context.appColors.whiteBG,
       child: Center(
         child: Row(
           mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -41,25 +38,19 @@ class RewardsMyPage extends HookConsumerWidget {
           children: List.generate(topSectionsData.length, (index) {
             final item = topSectionsData[index];
             return Container(
-              width:
-                  MediaQuery.of(context).size.width / topSectionsData.length -
-                      30,
+              width: MediaQuery.of(context).size.width / topSectionsData.length - 30,
               height: 43,
-              padding: const EdgeInsets.only(
-                  top: 10, bottom: 10, left: 10, right: 10),
+              padding: const EdgeInsets.only(top: 10, bottom: 10, left: 10, right: 10),
               decoration: index == currentTabIdx
                   ? BoxDecoration(
-                      color: index == currentTabIdx
-                          ? context.appColors.btnBgDefault
-                          : ColorUtils.string2Color("#F2F3F6"),
+                      color: index == currentTabIdx ? context.appColors.btnBgDefault : ColorUtils.string2Color("#F2F3F6"),
                       borderRadius: BorderRadius.circular(20),
                       boxShadow: [
                         BoxShadow(
                           color: Colors.grey.withOpacity(0.5),
                           spreadRadius: 1,
                           blurRadius: 5,
-                          offset:
-                              const Offset(0, 2), // changes position of shadow
+                          offset: const Offset(0, 2), // changes position of shadow
                         ),
                       ],
                     )
@@ -74,9 +65,7 @@ class RewardsMyPage extends HookConsumerWidget {
                         fontSize: 16,
                         textAlign: TextAlign.center,
                         isFontMedium: true,
-                        textColor: index == currentTabIdx
-                            ? Colors.white
-                            : ColorUtils.string2Color("#000000"),
+                        textColor: index == currentTabIdx ? Colors.white : context.appColors.textBlack,
                       ),
                     ).onTap(
                       () {
@@ -100,7 +89,7 @@ class RewardsMyPage extends HookConsumerWidget {
     return Scaffold(
         appBar: MyAppBar.appBar(
           context,
-          "My Rewards",
+          S.current.my_rewards,
           backgroundColor: context.appColors.whiteBG,
         ),
         body: AutoTabsRouter.pageView(

+ 23 - 44
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_used/rewards_my_used_page.dart

@@ -1,4 +1,6 @@
 import 'package:cpt_rewards/modules/rewards_transaction/rewards_transaction_page.dart';
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
@@ -47,36 +49,27 @@ class RewardsMyUsedPage extends HookConsumerWidget {
               maxLines: 1, // 设置最大行数为2
               overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
               title,
-              style: const TextStyle(
-                  fontSize: 16.0,
-                  color: Colors.black,
-                  fontWeight: FontWeight.w500),
+              style: TextStyle(fontSize: 16.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
             ),
             Row(
               children: [
                 Text(
                   '$point',
-                  style: const TextStyle(
-                      fontSize: 19.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w500),
+                  style: TextStyle(fontSize: 19.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                 ),
                 Text(
                   '$originalPoint',
                   style: TextStyle(
                       decoration: TextDecoration.lineThrough,
-                      decorationColor: ColorUtils.string2Color('#000000'),
+                      decorationColor: context.appColors.textBlack,
                       decorationStyle: TextDecorationStyle.solid,
                       fontSize: 12.0,
-                      color: ColorUtils.string2Color('#000000'),
+                      color: context.appColors.textBlack,
                       fontWeight: FontWeight.w400),
                 ).marginOnly(left: 5, right: 5),
-                const Text(
-                  'Points',
-                  style: TextStyle(
-                      fontSize: 13.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w400),
+                Text(
+                  S.current.points,
+                  style: TextStyle(fontSize: 13.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                 ),
               ],
             ),
@@ -90,21 +83,15 @@ class RewardsMyUsedPage extends HookConsumerWidget {
                       width: 15,
                       height: 15,
                     ),
-                    const Text(
-                      'Redeem From:',
-                      style: TextStyle(
-                          fontSize: 13.0,
-                          color: Colors.black,
-                          fontWeight: FontWeight.w400),
+                    Text(
+                      '${S.current.redeem_from}:',
+                      style: TextStyle(fontSize: 13.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                     ).marginOnly(left: 6)
                   ],
                 ),
                 Text(
                   '$redeemedDate',
-                  style: const TextStyle(
-                      fontSize: 13.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w400),
+                  style: TextStyle(fontSize: 13.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                 )
               ],
             ),
@@ -116,29 +103,23 @@ class RewardsMyUsedPage extends HookConsumerWidget {
                   height: 15,
                 ),
                 Text(
-                  'Redeemed at: $usedAt',
-                  style: const TextStyle(
-                      fontSize: 13.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w400),
+                  '${S.current.redeem_deal_at}: $usedAt',
+                  style: TextStyle(fontSize: 13.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                 ).marginOnly(left: 6)
               ],
             ).paddingOnly(left: 6),
             Container(
                 height: 43,
                 decoration: BoxDecoration(
-                  color: ColorUtils.string2Color('#4161D0'),
+                  color: context.appColors.btnBgDefaultDark,
                   borderRadius: BorderRadius.circular(8), // 圆角
                 ),
                 child: Expanded(
                     child: Container(
                         alignment: Alignment.center,
                         child: Text(
-                          'View',
-                          style: TextStyle(
-                              fontSize: 15.0,
-                              color: ColorUtils.string2Color('#FFFFFF'),
-                              fontWeight: FontWeight.w500),
+                          S.current.view,
+                          style: const TextStyle(fontSize: 15.0, color: Colors.white, fontWeight: FontWeight.w500),
                         )))).marginOnly(top: 10, bottom: 5).onTap(() {
               RewardsTransactionPage.startInstance();
             }),
@@ -159,12 +140,10 @@ class RewardsMyUsedPage extends HookConsumerWidget {
   // listitem
   Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
     return Container(
-      decoration: const BoxDecoration(
-        color: Colors.white,
-        borderRadius: BorderRadius.all(Radius.circular(6.0)),
-        boxShadow: [
-          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-        ],
+      decoration: BoxDecoration(
+        color: context.appColors.whiteBG,
+        borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+        boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
       ),
       child: Column(
         children: [
@@ -227,7 +206,7 @@ class RewardsMyUsedPage extends HookConsumerWidget {
                 vm.onRefresh();
               },
               child: Container(
-                color: ColorUtils.string2Color('#F2F3F6'),
+                color: context.appColors.backgroundDark,
                 padding: const EdgeInsets.only(top: 15),
                 child: LoadStateLayout(
                   state: state.loadingState,

+ 4 - 3
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_vm.dart

@@ -1,5 +1,6 @@
 
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
@@ -21,19 +22,19 @@ class RewardsMyVmState {
     this.curIdx = 0,
   }) : topSectionsData = topSectionsData?? [
     {
-      "title": "Active",
+      "title": S.current.facility_active,
       "icon": Assets.propertyIoan,
       "pageStartInstanceFn": RewardsMyActivePage.startInstance,
       "page": const RewardsMyActivePage(),
     },
     {
-      "title": "Expired",
+      "title": S.current.expired,
       "icon": Assets.propertyNews,
       "pageStartInstanceFn": RewardsMyExpiredPage.startInstance,
       "page": const RewardsMyExpiredPage(),
     },
     {
-      "title": "Used",
+      "title": S.current.used,
       "icon": Assets.propertySale,
       "pageStartInstanceFn": RewardsMyUsedPage.startInstance,
       "page": const RewardsMyUsedPage(),

+ 41 - 39
packages/cpt_rewards/lib/modules/rewards_redeem/rewards_redeem_page.dart

@@ -1,3 +1,4 @@
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:domain/entity/rewards_active_detail_entity.dart';
 import 'package:domain/entity/rewards_my_detail_entity.dart';
@@ -15,6 +16,7 @@ import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/shatter/picker_container.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:cs_resources/generated/assets.dart';
 
@@ -48,10 +50,10 @@ class RewardsRedeemPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-            decoration: const BoxDecoration(
-              color: Colors.white,
-              borderRadius: BorderRadius.all(Radius.circular(6.0)),
-              boxShadow: [
+            decoration:  BoxDecoration(
+              color: context.appColors.whiteBG,
+              borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+              boxShadow: const [
                 BoxShadow(
                     color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
               ],
@@ -78,18 +80,18 @@ class RewardsRedeemPage extends HookConsumerWidget {
                       maxLines: 1, // 设置最大行数为2
                       overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
                       title,
-                      style: const TextStyle(
+                      style:  TextStyle(
                           fontSize: 17.0,
-                          color: Colors.black,
+                          color: context.appColors.textBlack,
                           fontWeight: FontWeight.w500),
                     ).marginOnly(bottom: 5),
                     Row(
                       children: [
                         Text(
                           '$point',
-                          style: const TextStyle(
+                          style:  TextStyle(
                               fontSize: 19.0,
-                              color: Colors.black,
+                              color: context.appColors.textBlack,
                               fontWeight: FontWeight.w500),
                         ),
                         Text(
@@ -97,17 +99,17 @@ class RewardsRedeemPage extends HookConsumerWidget {
                           style: TextStyle(
                               decoration: TextDecoration.lineThrough,
                               decorationColor:
-                                  ColorUtils.string2Color('#808DAF'),
+                                 DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#808DAF'),darkColor: Colors.white),
                               decorationStyle: TextDecorationStyle.solid,
                               fontSize: 12.0,
-                              color: ColorUtils.string2Color('#808DAF'),
+                              color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#808DAF'),darkColor: Colors.white),
                               fontWeight: FontWeight.w400),
                         ).marginOnly(left: 5, right: 5),
-                        const Text(
-                          'Points',
-                          style: TextStyle(
+                         Text(
+                          S.current.points,
+                          style:  TextStyle(
                               fontSize: 13.0,
-                              color: Colors.black,
+                              color: context.appColors.textBlack   ,
                               fontWeight: FontWeight.w400),
                         ),
                       ],
@@ -125,10 +127,10 @@ class RewardsRedeemPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
-            borderRadius: BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [
+          decoration:  BoxDecoration(
+            color: context.appColors.whiteBG   ,
+            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: const [
               BoxShadow(
                   color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
             ],
@@ -148,10 +150,10 @@ class RewardsRedeemPage extends HookConsumerWidget {
                     height: 25,
                   ).marginOnly(right: 10),
                   Text(
-                    'Redeem Date',
+                    S.current.redeem_date,
                     style: TextStyle(
                         fontSize: 15.0,
-                        color: ColorUtils.string2Color('#000000'),
+                        color: context.appColors.textBlack   ,
                         fontWeight: FontWeight.w500),
                   )
                 ],
@@ -163,7 +165,7 @@ class RewardsRedeemPage extends HookConsumerWidget {
                     createdAt,
                     style: TextStyle(
                         fontSize: 15.0,
-                        color: ColorUtils.string2Color('#54638C'),
+                        color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white),
                         fontWeight: FontWeight.w400),
                   ),
                 ],
@@ -182,10 +184,10 @@ class RewardsRedeemPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
-            borderRadius: BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [
+          decoration:  BoxDecoration(
+            color: context.appColors.whiteBG ,
+            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: const [
               BoxShadow(
                   color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
             ],
@@ -205,10 +207,10 @@ class RewardsRedeemPage extends HookConsumerWidget {
                     height: 25,
                   ).marginOnly(right: 10),
                   Text(
-                    'Redeem From',
+                    S.current.redeem_from,
                     style: TextStyle(
                         fontSize: 15.0,
-                        color: ColorUtils.string2Color('#000000'),
+                        color:context.appColors.textBlack ,
                         fontWeight: FontWeight.w500),
                   )
                 ],
@@ -220,7 +222,7 @@ class RewardsRedeemPage extends HookConsumerWidget {
                     redeemedDate,
                     style: TextStyle(
                         fontSize: 15.0,
-                        color: ColorUtils.string2Color('#54638C'),
+                        color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white),
                         fontWeight: FontWeight.w400),
                   ),
                 ],
@@ -236,10 +238,10 @@ class RewardsRedeemPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
-            borderRadius: BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [
+          decoration:  BoxDecoration(
+            color:context.appColors.whiteBG  ,
+            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: const [
               BoxShadow(
                   color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
             ],
@@ -260,10 +262,10 @@ class RewardsRedeemPage extends HookConsumerWidget {
                   ).marginOnly(right: 12),
                   Expanded(
                     child: Text(
-                      'You’ve redeemed the following promotion.',
+                      S.current.have_redeemed_promotion,
                       style: TextStyle(
                           fontSize: 15.0,
-                          color: ColorUtils.string2Color('#4161D0'),
+                          color: context.appColors.textPrimary   ,
                           fontWeight: FontWeight.w500),
                     ),
                   )
@@ -279,7 +281,7 @@ class RewardsRedeemPage extends HookConsumerWidget {
   Widget _buildTop(BuildContext context, WidgetRef ref, _vm) {
     return Container(
         width: MediaQuery.of(context).size.width,
-        color: ColorUtils.string2Color('#FFFFFF'),
+        color: context.appColors.whiteBG  ,
         padding: const EdgeInsets.only(top: 15, bottom: 30),
         child: Column(
           mainAxisAlignment: MainAxisAlignment.center,
@@ -291,10 +293,10 @@ class RewardsRedeemPage extends HookConsumerWidget {
               height: 54,
             ),
             Text(
-              'Congratulations!',
+              '${S.current.congratulations}!',
               style: TextStyle(
                   fontSize: 18.0,
-                  color: ColorUtils.string2Color('#4161D0'),
+                  color: context.appColors.textPrimary    ,
                   fontWeight: FontWeight.w500),
             ).marginOnly(top: 12, bottom: 15),
           ],
@@ -317,7 +319,7 @@ class RewardsRedeemPage extends HookConsumerWidget {
     return Scaffold(
       appBar: MyAppBar.appBar(
         context,
-        "Payment Successful",
+        S.current.payment_successful,
         backgroundColor: context.appColors.whiteBG,
       ),
       body: detailInfo?.createdAt != ''
@@ -338,7 +340,7 @@ class RewardsRedeemPage extends HookConsumerWidget {
                             children: [
                               _buildTop(context, ref, _vm),
                               Container(
-                                  color: ColorUtils.string2Color('#F2F3F6'),
+                                  color: context.appColors.backgroundDark,
                                   padding: const EdgeInsets.only(top: 15),
                                   child: Column(
                                     children: [

+ 66 - 107
packages/cpt_rewards/lib/modules/rewards_search/rewards_search_page.dart

@@ -1,4 +1,5 @@
 import 'package:cpt_rewards/modules/rewards_detail/rewards_detail_page.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:cs_resources/theme/theme_config.dart';
 import 'package:domain/entity/rewards_search_entity.dart';
@@ -15,6 +16,7 @@ import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/shatter/picker_container.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:cs_resources/generated/assets.dart';
 
@@ -52,36 +54,27 @@ class RewardsSearchPage extends HookConsumerWidget {
               maxLines: 1, // 设置最大行数为2
               overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
               item?['name'] ?? '',
-              style: const TextStyle(
-                  fontSize: 16.0,
-                  color: Colors.black,
-                  fontWeight: FontWeight.w500),
+              style: TextStyle(fontSize: 16.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
             ).marginOnly(bottom: 5, top: 10),
             Row(
               children: [
                 Text(
                   '$point',
-                  style: const TextStyle(
-                      fontSize: 19.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w500),
+                  style: TextStyle(fontSize: 19.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                 ),
                 Text(
                   '$originalPoint',
                   style: TextStyle(
                       decoration: TextDecoration.lineThrough,
-                      decorationColor: ColorUtils.string2Color('#000000'),
+                      decorationColor: context.appColors.textBlack,
                       decorationStyle: TextDecorationStyle.solid,
                       fontSize: 12.0,
-                      color: ColorUtils.string2Color('#000000'),
+                      color: context.appColors.textBlack,
                       fontWeight: FontWeight.w400),
                 ).marginOnly(left: 5, right: 5),
-                const Text(
-                  'Points',
-                  style: TextStyle(
-                      fontSize: 13.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w400),
+                Text(
+                  S.current.points,
+                  style: TextStyle(fontSize: 13.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                 ),
               ],
             ),
@@ -96,12 +89,10 @@ class RewardsSearchPage extends HookConsumerWidget {
   // listitem
   Widget _buildSaleItem(BuildContext context, WidgetRef ref, _vm, item) {
     return Container(
-      decoration: const BoxDecoration(
-        color: Colors.white,
-        borderRadius: BorderRadius.all(Radius.circular(6.0)),
-        boxShadow: [
-          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-        ],
+      decoration: BoxDecoration(
+        color: context.appColors.whiteBG,
+        borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+        boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
       ),
       child: Column(
         children: [
@@ -113,8 +104,7 @@ class RewardsSearchPage extends HookConsumerWidget {
               crossAxisAlignment: CrossAxisAlignment.start,
               mainAxisAlignment: MainAxisAlignment.start,
               children: [
-                _buildItemLeftSection(context, ref, item, _vm)
-                    .marginOnly(bottom: 5),
+                _buildItemLeftSection(context, ref, item, _vm).marginOnly(bottom: 5),
               ],
             ).paddingOnly(left: 20, right: 20),
           ).constrained(
@@ -134,15 +124,9 @@ class RewardsSearchPage extends HookConsumerWidget {
       crossAxisAlignment: CrossAxisAlignment.start,
       mainAxisAlignment: MainAxisAlignment.start,
       children: [
-        recent.length > 0
-            ? _buildSearchRecent(context, ref, _vm, recent)
-            : Container(),
-        trending.length > 0
-            ? _buildSearchTrending(context, ref, _vm, trending)
-            : Container(),
-        rewards.length > 0
-            ? _buildSearchRecently(context, ref, _vm, rewards)
-            : Container(),
+        recent.length > 0 ? _buildSearchRecent(context, ref, _vm, recent) : Container(),
+        trending.length > 0 ? _buildSearchTrending(context, ref, _vm, trending) : Container(),
+        rewards.length > 0 ? _buildSearchRecently(context, ref, _vm, rewards) : Container(),
       ],
     );
   }
@@ -155,11 +139,8 @@ class RewardsSearchPage extends HookConsumerWidget {
       mainAxisAlignment: MainAxisAlignment.start,
       children: [
         Text(
-          'Recent Searches',
-          style: TextStyle(
-              fontSize: 16.0,
-              color: ColorUtils.string2Color('#000000'),
-              fontWeight: FontWeight.w500),
+          S.current.recent_searches,
+          style: TextStyle(fontSize: 16.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
         ).marginOnly(bottom: 20),
         Wrap(
             direction: Axis.horizontal, // 水平方向排列
@@ -172,19 +153,18 @@ class RewardsSearchPage extends HookConsumerWidget {
     ).marginOnly(bottom: 20);
   }
 
-  Widget _buildSearchRecentItem(
-      BuildContext context, WidgetRef ref, _vm, recent) {
+  Widget _buildSearchRecentItem(BuildContext context, WidgetRef ref, _vm, recent) {
     return Container(
-      decoration: const BoxDecoration(
-        color: Colors.white,
+      decoration: BoxDecoration(
+        color: context.appColors.whiteBG,
         borderRadius: BorderRadius.all(Radius.circular(3.0)),
       ),
-      padding: const EdgeInsets.all(10),
+      padding: EdgeInsets.all(10),
       child: Text(
         recent,
         style: TextStyle(
             fontSize: 14.0,
-            color: ColorUtils.string2Color('#969696'),
+            color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#969696'), darkColor: Colors.white),
             fontWeight: FontWeight.w400),
       ),
     ).onTap(() {
@@ -193,37 +173,31 @@ class RewardsSearchPage extends HookConsumerWidget {
   }
 
   // Trending
-  Widget _buildSearchTrending(
-      BuildContext context, WidgetRef ref, _vm, trending) {
+  Widget _buildSearchTrending(BuildContext context, WidgetRef ref, _vm, trending) {
     // List itemsList = _vm.state.list.toList();
     return Column(
       crossAxisAlignment: CrossAxisAlignment.start,
       mainAxisAlignment: MainAxisAlignment.start,
       children: [
         Text(
-          'Trending Searches',
-          style: TextStyle(
-              fontSize: 16.0,
-              color: ColorUtils.string2Color('#000000'),
-              fontWeight: FontWeight.w500),
+          S.current.trending_searches,
+          style: TextStyle(fontSize: 16.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
         ).marginOnly(bottom: 20),
         Wrap(
             direction: Axis.horizontal, // 水平方向排列
             spacing: 10.0, // 子组件之间的间距
             runSpacing: 15.0, // 子组件行与行之间的间距
             children: List.generate(trending.length, (index) {
-              return _buildSearchTrendingItem(
-                  context, ref, _vm, trending[index]);
+              return _buildSearchTrendingItem(context, ref, _vm, trending[index]);
             }))
       ],
     ).marginOnly(bottom: 20);
   }
 
-  Widget _buildSearchTrendingItem(
-      BuildContext context, WidgetRef ref, _vm, trending) {
+  Widget _buildSearchTrendingItem(BuildContext context, WidgetRef ref, _vm, trending) {
     return Container(
-      decoration: const BoxDecoration(
-        color: Colors.white,
+      decoration: BoxDecoration(
+        color: context.appColors.whiteBG,
         borderRadius: BorderRadius.all(Radius.circular(3.0)),
       ),
       padding: const EdgeInsets.all(10),
@@ -239,7 +213,7 @@ class RewardsSearchPage extends HookConsumerWidget {
             trending,
             style: TextStyle(
                 fontSize: 14.0,
-                color: ColorUtils.string2Color('#969696'),
+                color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#969696'), darkColor: Colors.white),
                 fontWeight: FontWeight.w400),
           ),
         ],
@@ -250,19 +224,15 @@ class RewardsSearchPage extends HookConsumerWidget {
   }
 
   // Recently
-  Widget _buildSearchRecently(
-      BuildContext context, WidgetRef ref, _vm, rewards) {
+  Widget _buildSearchRecently(BuildContext context, WidgetRef ref, _vm, rewards) {
     // List itemsList = _vm.state.list.toList();
     return Column(
       crossAxisAlignment: CrossAxisAlignment.start,
       mainAxisAlignment: MainAxisAlignment.start,
       children: [
         Text(
-          'Recently viewed',
-          style: TextStyle(
-              fontSize: 16.0,
-              color: ColorUtils.string2Color('#000000'),
-              fontWeight: FontWeight.w500),
+          S.current.recently_viewed,
+          style: TextStyle(fontSize: 16.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
         ).marginOnly(bottom: 18),
         Column(
             crossAxisAlignment: CrossAxisAlignment.center,
@@ -283,12 +253,10 @@ class RewardsSearchPage extends HookConsumerWidget {
         // width: MediaQuery.of(context).size.width / 2 - 25,
         // height: 240,
         padding: const EdgeInsets.only(bottom: 20),
-        decoration: const BoxDecoration(
-          color: Colors.white,
-          borderRadius: BorderRadius.all(Radius.circular(6.0)),
-          boxShadow: [
-            BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-          ],
+        decoration:  BoxDecoration(
+          color: context.appColors.whiteBG,
+          borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+          boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
         ),
         child: Column(
           children: [
@@ -304,19 +272,13 @@ class RewardsSearchPage extends HookConsumerWidget {
                   maxLines: 1, // 设置最大行数为2
                   overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
                   item.name ?? '',
-                  style: const TextStyle(
-                      fontSize: 15.0,
-                      color: Colors.black,
-                      fontWeight: FontWeight.w500),
+                  style:  TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                 ).marginOnly(bottom: 5, top: 10),
                 Row(
                   children: [
                     Text(
                       '$point',
-                      style: const TextStyle(
-                          fontSize: 18.0,
-                          color: Colors.black,
-                          fontWeight: FontWeight.w500),
+                      style:  TextStyle(fontSize: 18.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                     ),
                     Text(
                       '$originalPoint',
@@ -325,15 +287,12 @@ class RewardsSearchPage extends HookConsumerWidget {
                           decorationColor: ColorUtils.string2Color('#808DAF'),
                           decorationStyle: TextDecorationStyle.solid,
                           fontSize: 13.0,
-                          color: ColorUtils.string2Color('#808DAF'),
+                          color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#808DAF'),darkColor: Colors.white),
                           fontWeight: FontWeight.w400),
                     ).marginOnly(left: 5, right: 5),
-                    const Text(
-                      'Points',
-                      style: TextStyle(
-                          fontSize: 13.0,
-                          color: Colors.black,
-                          fontWeight: FontWeight.w400),
+                    Text(
+                      S.current.points,
+                      style:  TextStyle(fontSize: 13.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                     ),
                   ],
                 )
@@ -369,13 +328,15 @@ class RewardsSearchPage extends HookConsumerWidget {
       };
     }, []);
     return Scaffold(
-      appBar: MyAppBar.searchAppBar(context, onSearch: (value) {
-        _vm.searchIn(value);
-      },
-          value: state.keyword,
-          backgroundColor: Colors.white,
-          systemUiOverlayStyle:
-              ThemeConfig.systemUiOverlayStyleLightThemeBlack),
+      appBar: MyAppBar.searchAppBar(
+        context,
+        onSearch: (value) {
+          _vm.searchIn(value);
+        },
+        value: state.keyword,
+        backgroundColor: context.appColors.backgroundWhite,
+        systemUiOverlayStyle: ThemeConfig.systemUiOverlayStyleLightThemeBlack,
+      ),
       body: searchIs
           ? LoadStateLayout(
               state: state.loadingState,
@@ -389,9 +350,8 @@ class RewardsSearchPage extends HookConsumerWidget {
                 clipBehavior: Clip.none,
                 child: Container(
                     width: MediaQuery.of(context).size.width,
-                    color: ColorUtils.string2Color('#F2F3F6'),
-                    padding:
-                        const EdgeInsets.only(top: 20, left: 15, right: 15),
+                    color: context.appColors.backgroundDark,
+                    padding: const EdgeInsets.only(top: 20, left: 15, right: 15),
                     child: _buildSearchOf(context, ref, _vm, detailInfo)),
               ))
           : Container(
@@ -411,17 +371,16 @@ class RewardsSearchPage extends HookConsumerWidget {
                         _vm.onRefresh();
                       },
                       child: Container(
-                          color: ColorUtils.string2Color('#F2F3F6'),
-                          padding: const EdgeInsets.only(top: 15),
-                          child: LoadStateLayout(
-                              state: state.loadingState,
-                              errorMessage: state.errorMessage,
-                              errorRetry: () {
-                                _vm.retryRequest();
-                              },
-                              successSliverWidget: [
-                                _buildSaleList(context, ref, _vm)
-                              ])),
+                        color: context.appColors.backgroundDark,
+                        padding: const EdgeInsets.only(top: 15),
+                        child: LoadStateLayout(
+                            state: state.loadingState,
+                            errorMessage: state.errorMessage,
+                            errorRetry: () {
+                              _vm.retryRequest();
+                            },
+                            successSliverWidget: [_buildSaleList(context, ref, _vm)]),
+                      ),
                     ),
                   )
                 ],

+ 38 - 36
packages/cpt_rewards/lib/modules/rewards_successful/rewards_successful_page.dart

@@ -1,5 +1,6 @@
 import 'package:cpt_rewards/modules/rewards_address/rewards_address_page.dart';
 import 'package:cpt_rewards/modules/rewards_my/rewards_my_page.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:domain/entity/rewards_buy_entity.dart';
 import 'package:domain/entity/rewards_detail_entity.dart';
@@ -15,6 +16,7 @@ import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/shatter/picker_container.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:cs_resources/generated/assets.dart';
 
@@ -70,12 +72,12 @@ class RewardsSuccessfulPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-            decoration: const BoxDecoration(
-              color: Colors.white,
-              borderRadius: BorderRadius.all(Radius.circular(6.0)),
+            decoration:  BoxDecoration(
+              color: context.appColors.whiteBG,
+              borderRadius: const BorderRadius.all(Radius.circular(6.0)),
               boxShadow: [
                 BoxShadow(
-                    color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+                    color: context.appColors.itemBGShadow)
               ],
             ),
             width: MediaQuery.of(context).size.width - 30,
@@ -98,9 +100,9 @@ class RewardsSuccessfulPage extends HookConsumerWidget {
                       maxLines: 1, // 设置最大行数为2
                       overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
                       titles,
-                      style: const TextStyle(
+                      style:  TextStyle(
                           fontSize: 17.0,
-                          color: Colors.black,
+                          color: context.appColors.textBlack,
                           fontWeight: FontWeight.w500),
                     ),
                   ],
@@ -115,12 +117,12 @@ class RewardsSuccessfulPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
-            borderRadius: BorderRadius.all(Radius.circular(6.0)),
+          decoration:  BoxDecoration(
+            color:context.appColors.whiteBG,
+            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
             boxShadow: [
               BoxShadow(
-                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+                  color: context.appColors.itemBGShadow)
             ],
           ),
           width: MediaQuery.of(context).size.width - 30,
@@ -138,10 +140,10 @@ class RewardsSuccessfulPage extends HookConsumerWidget {
                     height: 25,
                   ).marginOnly(right: 5),
                   Text(
-                    'Redeem Deal At',
+                    S.current.redeem_deal_at,
                     style: TextStyle(
                         fontSize: 15.0,
-                        color: ColorUtils.string2Color('#000000'),
+                        color: context.appColors.textBlack,
                         fontWeight: FontWeight.w500),
                   )
                 ],
@@ -156,7 +158,7 @@ class RewardsSuccessfulPage extends HookConsumerWidget {
                     overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
                     style: TextStyle(
                         fontSize: 15.0,
-                        color: ColorUtils.string2Color('#54638C'),
+                        color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white),
                         fontWeight: FontWeight.w400),
                   ),
                 ],
@@ -173,12 +175,12 @@ class RewardsSuccessfulPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
-            borderRadius: BorderRadius.all(Radius.circular(6.0)),
+          decoration:  BoxDecoration(
+            color: context.appColors.whiteBG  ,
+            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
             boxShadow: [
               BoxShadow(
-                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+                  color: context.appColors.itemBGShadow  )
             ],
           ),
           width: MediaQuery.of(context).size.width - 30,
@@ -196,10 +198,10 @@ class RewardsSuccessfulPage extends HookConsumerWidget {
                     height: 15,
                   ).marginOnly(right: 10),
                   Text(
-                    'Redeem From',
+                    S.current.redeem_from,
                     style: TextStyle(
                         fontSize: 15.0,
-                        color: ColorUtils.string2Color('#000000'),
+                        color: context.appColors.textBlack  ,
                         fontWeight: FontWeight.w500),
                   )
                 ],
@@ -211,7 +213,7 @@ class RewardsSuccessfulPage extends HookConsumerWidget {
                     redeemedDates,
                     style: TextStyle(
                         fontSize: 15.0,
-                        color: ColorUtils.string2Color('#54638C'),
+                        color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white),
                         fontWeight: FontWeight.w400),
                   ),
                 ],
@@ -228,12 +230,12 @@ class RewardsSuccessfulPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
-            borderRadius: BorderRadius.all(Radius.circular(6.0)),
+          decoration:  BoxDecoration(
+            color: context.appColors.whiteBG   ,
+            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
             boxShadow: [
               BoxShadow(
-                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+                  color: context.appColors.itemBGShadow   )
             ],
           ),
           width: MediaQuery.of(context).size.width - 30,
@@ -245,10 +247,10 @@ class RewardsSuccessfulPage extends HookConsumerWidget {
                 crossAxisAlignment: CrossAxisAlignment.center,
                 children: [
                   Text(
-                    'Date & Time:',
+                    '${S.current.date_time}:',
                     style: TextStyle(
                         fontSize: 15.0,
-                        color: ColorUtils.string2Color('#333333'),
+                        color: context.appColors.tabTextUnSelectedPrimary,
                         fontWeight: FontWeight.w400),
                   ),
                   Row(
@@ -257,7 +259,7 @@ class RewardsSuccessfulPage extends HookConsumerWidget {
                         createdAts,
                         style: TextStyle(
                             fontSize: 15.0,
-                            color: ColorUtils.string2Color('#54638C'),
+                            color:  DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white),
                             fontWeight: FontWeight.w400),
                       ),
                     ],
@@ -298,7 +300,7 @@ class RewardsSuccessfulPage extends HookConsumerWidget {
   Widget _buildTop(BuildContext context, WidgetRef ref, _vm) {
     return Container(
         width: MediaQuery.of(context).size.width,
-        color: ColorUtils.string2Color('#FFFFFF'),
+        color: context.appColors.whiteBG  ,
         padding: const EdgeInsets.only(top: 15, bottom: 30),
         child: Column(
           mainAxisAlignment: MainAxisAlignment.center,
@@ -310,17 +312,17 @@ class RewardsSuccessfulPage extends HookConsumerWidget {
               height: 54,
             ),
             Text(
-              'You Have Paid Points',
+              S.current.you_have_paid_points,
               style: TextStyle(
                   fontSize: 18.0,
-                  color: ColorUtils.string2Color('#4161D0'),
+                  color:  DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#4161D0'),darkColor: Colors.white),
                   fontWeight: FontWeight.w500),
             ).marginOnly(top: 12, bottom: 15),
             Text(
               '$amount',
               style: TextStyle(
                   fontSize: 30.0,
-                  color: ColorUtils.string2Color('#000000'),
+                  color: context.appColors.textBlack  ,
                   fontWeight: FontWeight.w500),
             ),
           ],
@@ -335,7 +337,7 @@ class RewardsSuccessfulPage extends HookConsumerWidget {
     return Scaffold(
       appBar: MyAppBar.appBar(
         context,
-        "Payment Successful",
+        S.current.payment_successful,
         backgroundColor: context.appColors.whiteBG,
       ),
       body: Column(
@@ -349,7 +351,7 @@ class RewardsSuccessfulPage extends HookConsumerWidget {
                     children: [
                       _buildTop(context, ref, _vm),
                       Container(
-                          color: ColorUtils.string2Color('#F2F3F6'),
+                          color: context.appColors.backgroundDark,
                           padding: const EdgeInsets.only(top: 15),
                           child: Column(
                             children: [
@@ -363,21 +365,21 @@ class RewardsSuccessfulPage extends HookConsumerWidget {
                   ))),
           Container(
             height: 50,
-            color: ColorUtils.string2Color('#4161D0'),
+            color:context.appColors.btnBgDefault,
             child: Flex(
               direction: Axis.horizontal,
               children: [
                 Expanded(
                   flex: 1,
                   child: Container(
-                    color: ColorUtils.string2Color('#4161D0'),
+                    color: context.appColors.btnBgDefault  ,
                     height: 100,
                     child: Row(
                       mainAxisAlignment: MainAxisAlignment.center,
                       crossAxisAlignment: CrossAxisAlignment.center,
                       children: [
                         MyTextView(
-                          "Check My Rewards",
+                          S.current.check_my_rewards,
                           fontSize: 16,
                           textColor: Colors.white,
                           isFontMedium: true,

+ 57 - 129
packages/cpt_rewards/lib/modules/rewards_transaction/rewards_transaction_page.dart

@@ -1,3 +1,4 @@
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:domain/entity/rewards_detail_entity.dart';
 import 'package:domain/entity/rewards_my_detail_entity.dart';
@@ -14,6 +15,7 @@ import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/shatter/picker_container.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:cs_resources/generated/assets.dart';
 
@@ -24,15 +26,11 @@ import './rewards_transaction_vm.dart';
 class RewardsTransactionPage extends HookConsumerWidget {
   final int? id;
   final String? type;
-  const RewardsTransactionPage(
-      {Key? key,
-      @PathParam('id') required this.id,
-      @PathParam('type') required this.type})
-      : super(key: key);
+
+  const RewardsTransactionPage({Key? key, @PathParam('id') required this.id, @PathParam('type') required this.type}) : super(key: key);
 
   //启动当前页面
-  static void startInstance(
-      {BuildContext? context, int? id, String? type = ''}) {
+  static void startInstance({BuildContext? context, int? id, String? type = ''}) {
     if (context != null) {
       context.router.push(RewardsTransactionPageRoute(id: id, type: type));
     } else {
@@ -50,13 +48,10 @@ class RewardsTransactionPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-            decoration: const BoxDecoration(
-              color: Colors.white,
-              borderRadius: BorderRadius.all(Radius.circular(6.0)),
-              boxShadow: [
-                BoxShadow(
-                    color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-              ],
+            decoration: BoxDecoration(
+              color: context.appColors.whiteBG,
+              borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+              boxShadow: const [BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)],
             ),
             width: MediaQuery.of(context).size.width - 30,
             // height: 420,
@@ -80,37 +75,27 @@ class RewardsTransactionPage extends HookConsumerWidget {
                       maxLines: 1, // 设置最大行数为2
                       overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
                       title,
-                      style: const TextStyle(
-                          fontSize: 17.0,
-                          color: Colors.black,
-                          fontWeight: FontWeight.w500),
+                      style: TextStyle(fontSize: 17.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                     ).marginOnly(bottom: 5),
                     Row(
                       children: [
                         Text(
                           '$point',
-                          style: const TextStyle(
-                              fontSize: 19.0,
-                              color: Colors.black,
-                              fontWeight: FontWeight.w500),
+                          style: TextStyle(fontSize: 19.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                         ),
                         Text(
                           '$originalPoint',
                           style: TextStyle(
                               decoration: TextDecoration.lineThrough,
-                              decorationColor:
-                                  ColorUtils.string2Color('#808DAF'),
+                              decorationColor: ColorUtils.string2Color('#808DAF'),
                               decorationStyle: TextDecorationStyle.solid,
                               fontSize: 12.0,
                               color: ColorUtils.string2Color('#808DAF'),
                               fontWeight: FontWeight.w400),
                         ).marginOnly(left: 5, right: 5),
-                        const Text(
-                          'Points',
-                          style: TextStyle(
-                              fontSize: 13.0,
-                              color: Colors.black,
-                              fontWeight: FontWeight.w400),
+                        Text(
+                          S.current.points,
+                          style: TextStyle(fontSize: 13.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                         ),
                       ],
                     ),
@@ -130,13 +115,10 @@ class RewardsTransactionPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
-            borderRadius: BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [
-              BoxShadow(
-                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-            ],
+          decoration: BoxDecoration(
+            color: context.appColors.whiteBG,
+            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: const [BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)],
           ),
           width: MediaQuery.of(context).size.width - 30,
           child: Column(
@@ -154,10 +136,7 @@ class RewardsTransactionPage extends HookConsumerWidget {
                   ).marginOnly(right: 15),
                   Text(
                     redeemedEnd,
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#000000'),
-                        fontWeight: FontWeight.w400),
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                   )
                 ],
               ).marginOnly(bottom: 20),
@@ -174,20 +153,14 @@ class RewardsTransactionPage extends HookConsumerWidget {
                         height: 25,
                       ).marginOnly(right: 15),
                       Text(
-                        'Verification Code',
-                        style: TextStyle(
-                            fontSize: 15.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w400),
+                        S.current.verification_code,
+                        style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                       ),
                     ],
                   ),
                   Text(
                     '$code',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#4161D0'),
-                        fontWeight: FontWeight.w500),
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500),
                   ),
                 ],
               ),
@@ -202,13 +175,10 @@ class RewardsTransactionPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
-            borderRadius: BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [
-              BoxShadow(
-                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-            ],
+          decoration: BoxDecoration(
+            color: context.appColors.whiteBG,
+            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: const [BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)],
           ),
           width: MediaQuery.of(context).size.width - 30,
           child: Column(
@@ -221,11 +191,8 @@ class RewardsTransactionPage extends HookConsumerWidget {
                 children: [
                   Expanded(
                     child: Text(
-                      'If you have any issue when redeem the voucher,please contact 6604 6896',
-                      style: TextStyle(
-                          fontSize: 15.0,
-                          color: ColorUtils.string2Color('#000000'),
-                          fontWeight: FontWeight.w500),
+                      S.current.issue_contact_phone,
+                      style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                     ),
                   )
                 ],
@@ -237,8 +204,7 @@ class RewardsTransactionPage extends HookConsumerWidget {
     ).marginOnly(left: 15, bottom: 25, right: 15);
   }
 
-  Widget _buildNotice(
-      BuildContext context, WidgetRef ref, _vm, types, detailInfo) {
+  Widget _buildNotice(BuildContext context, WidgetRef ref, _vm, types, detailInfo) {
     int phone = detailInfo.account.phone ?? 0;
     String createdAt = detailInfo.createdAt ?? "";
     String usedAt = detailInfo.usedAt ?? "";
@@ -248,13 +214,10 @@ class RewardsTransactionPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration: const BoxDecoration(
-            color: Colors.white,
-            borderRadius: BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [
-              BoxShadow(
-                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
-            ],
+          decoration: BoxDecoration(
+            color: context.appColors.whiteBG,
+            borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: const [BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)],
           ),
           width: MediaQuery.of(context).size.width - 30,
           child: Column(
@@ -271,11 +234,8 @@ class RewardsTransactionPage extends HookConsumerWidget {
                     height: 25,
                   ).marginOnly(right: 10),
                   Text(
-                    'Transaction Details',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#000000'),
-                        fontWeight: FontWeight.w500),
+                    S.current.transaction_details,
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                   )
                 ],
               ).marginOnly(bottom: 12),
@@ -284,20 +244,14 @@ class RewardsTransactionPage extends HookConsumerWidget {
                 crossAxisAlignment: CrossAxisAlignment.center,
                 children: [
                   Text(
-                    'Purchase Mobile No :',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#000000'),
-                        fontWeight: FontWeight.w400),
+                    '${S.current.purchase_mobile_no} :',
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                   ),
                   Row(
                     children: [
                       Text(
                         '$phone',
-                        style: TextStyle(
-                            fontSize: 15.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w500),
+                        style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                       ),
                     ],
                   ),
@@ -308,20 +262,14 @@ class RewardsTransactionPage extends HookConsumerWidget {
                 crossAxisAlignment: CrossAxisAlignment.center,
                 children: [
                   Text(
-                    'Purchase Date :',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#000000'),
-                        fontWeight: FontWeight.w400),
+                    '${S.current.purchase_date} :',
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                   ),
                   Row(
                     children: [
                       Text(
                         createdAt,
-                        style: TextStyle(
-                            fontSize: 15.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w500),
+                        style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                       ),
                     ],
                   ),
@@ -333,20 +281,14 @@ class RewardsTransactionPage extends HookConsumerWidget {
                       crossAxisAlignment: CrossAxisAlignment.center,
                       children: [
                         Text(
-                          'Redeemed Date :',
-                          style: TextStyle(
-                              fontSize: 15.0,
-                              color: ColorUtils.string2Color('#000000'),
-                              fontWeight: FontWeight.w400),
+                          '${S.current.redeemed_date} :',
+                          style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                         ),
                         Row(
                           children: [
                             Text(
                               usedAt,
-                              style: TextStyle(
-                                  fontSize: 15.0,
-                                  color: ColorUtils.string2Color('#000000'),
-                                  fontWeight: FontWeight.w500),
+                              style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                             ),
                           ],
                         ),
@@ -358,20 +300,14 @@ class RewardsTransactionPage extends HookConsumerWidget {
                 crossAxisAlignment: CrossAxisAlignment.center,
                 children: [
                   Text(
-                    'Quantity :',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#000000'),
-                        fontWeight: FontWeight.w400),
+                    '${S.current.quantity} :',
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
                   ),
                   Row(
                     children: [
                       Text(
                         '$quantity',
-                        style: TextStyle(
-                            fontSize: 15.0,
-                            color: ColorUtils.string2Color('#000000'),
-                            fontWeight: FontWeight.w500),
+                        style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
                       ),
                     ],
                   ),
@@ -382,11 +318,8 @@ class RewardsTransactionPage extends HookConsumerWidget {
                 crossAxisAlignment: CrossAxisAlignment.center,
                 children: [
                   Text(
-                    'Points:',
-                    style: TextStyle(
-                        fontSize: 15.0,
-                        color: ColorUtils.string2Color('#333333'),
-                        fontWeight: FontWeight.w400),
+                    '${S.current.points} :',
+                    style: TextStyle(fontSize: 15.0, color: context.appColors.tabTextUnSelectedPrimary, fontWeight: FontWeight.w400),
                   ),
                   Row(
                     children: [
@@ -394,18 +327,15 @@ class RewardsTransactionPage extends HookConsumerWidget {
                         '$originalPoint',
                         style: TextStyle(
                             decoration: TextDecoration.lineThrough,
-                            decorationColor: ColorUtils.string2Color('#54638C'),
+                            decorationColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white),
                             decorationStyle: TextDecorationStyle.solid,
                             fontSize: 14.0,
-                            color: ColorUtils.string2Color('#54638C'),
+                            color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white),
                             fontWeight: FontWeight.w400),
                       ),
                       Text(
                         '$point',
-                        style: TextStyle(
-                            fontSize: 19.0,
-                            color: ColorUtils.string2Color('#333333'),
-                            fontWeight: FontWeight.w500),
+                        style: TextStyle(fontSize: 19.0, color: context.appColors.tabTextUnSelectedPrimary, fontWeight: FontWeight.w500),
                       ).marginOnly(left: 10),
                     ],
                   ),
@@ -435,7 +365,7 @@ class RewardsTransactionPage extends HookConsumerWidget {
     return Scaffold(
       appBar: MyAppBar.appBar(
         context,
-        "My Rewards Details",
+        S.current.my_rewards_details,
         backgroundColor: context.appColors.whiteBG,
       ),
       body: detailInfo?.createdAt != ''
@@ -449,15 +379,13 @@ class RewardsTransactionPage extends HookConsumerWidget {
                         child: Column(
                           children: [
                             Container(
-                                color: ColorUtils.string2Color('#F2F3F6'),
+                                color: context.appColors.backgroundDark,
                                 padding: const EdgeInsets.only(top: 15),
                                 child: Column(
                                   children: [
-                                    _buildSaleItem(
-                                        context, ref, _vm, detailInfo),
+                                    _buildSaleItem(context, ref, _vm, detailInfo),
                                     _buildDeal(context, ref, _vm, detailInfo),
-                                    _buildNotice(
-                                        context, ref, _vm, types, detailInfo),
+                                    _buildNotice(context, ref, _vm, types, detailInfo),
                                     _buildPackage(context, ref, _vm),
                                   ],
                                 )),

+ 2 - 1
packages/cpt_services/lib/components/chooseAirConditionTitle.dart

@@ -1,5 +1,6 @@
 
 import 'package:cpt_services/modules/services/service_clean_detail/service_clean_detail_vm.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
@@ -49,7 +50,7 @@ class ChooseAirConditionTitle extends HookConsumerWidget {
             child: Column(
               children: [
                 MyTextView(
-                  "Select Air Conditioner",
+                  S.current.select_air_conditioner,
                   textColor: context.appColors.textBlack,
                   textAlign: TextAlign.left,
                   isFontBold: true,

+ 18 - 20
packages/cpt_services/lib/components/chooseHouseCleanContent.dart

@@ -75,8 +75,8 @@ class ChooseHouseCleanContent extends HookConsumerWidget {
     // final isDisable = useState<bool>(disabled);
 
     return Container(
-      padding: EdgeInsets.only(left: 10, right: 10, top: 10, bottom: 10),
-      margin: EdgeInsets.only(left: 15, right: 15, top: 0, bottom: 0),
+      padding: const EdgeInsets.only(left: 10, right: 10, top: 10, bottom: 10),
+      margin: const EdgeInsets.only(left: 15, right: 15, top: 0, bottom: 0),
       color: ColorUtils.string2Color('#F8F8F8'),
       child: Column(
         children: [
@@ -115,24 +115,22 @@ class ChooseHouseCleanContent extends HookConsumerWidget {
               //   fontSize: 19,
               //   fontWeight: FontWeight.w500,
               // )
-              Container(
-                child: MyButton(
-                  text: '\$$price',
-                  onPressed: (){
-                    if(!isDisable){
-                      vm.handlerChangeItemChecked(context, index);
-                    }
-                  },
-                  minWidth: 80,
-                  minHeight: 40,
-                  fontSize: 19,
-                  fontWeight: FontWeight.w500,
-                  enable: !isDisable,
-                  textColor:  !isChecked? context.appColors.textPrimary : context.appColors.textWhite,
-                  backgroundColor: !isChecked ? context.appColors.textWhite : context.appColors.textPrimary,
-                  disabledBackgroundColor: context.appColors.disEnableGray,
-                  disabledTextColor: context.appColors.textWhite,
-                ),
+              MyButton(
+                text: '\$$price',
+                onPressed: (){
+                  if(!isDisable){
+                    vm.handlerChangeItemChecked(context, index);
+                  }
+                },
+                minWidth: 80,
+                minHeight: 40,
+                fontSize: 19,
+                fontWeight: FontWeight.w500,
+                enable: !isDisable,
+                textColor:  !isChecked? context.appColors.textPrimary : context.appColors.textWhite,
+                backgroundColor: !isChecked ? context.appColors.textWhite : context.appColors.textPrimary,
+                disabledBackgroundColor: context.appColors.disEnableGray,
+                disabledTextColor: context.appColors.textWhite,
               ),
             ],
           ),

+ 2 - 1
packages/cpt_services/lib/components/chooseHouseCleanTitle.dart

@@ -4,6 +4,7 @@ import 'package:cpt_services/components/chooseVisitTimeContent_vm.dart';
 import 'package:cpt_services/components/chooseVisitTimeTitle_vm.dart';
 import 'package:cpt_services/modules/services/service_clean_detail/service_clean_detail_vm.dart';
 import 'package:cpt_services/modules/services/service_order_confirm/service_order_confirm_vm.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
@@ -42,7 +43,7 @@ class ChooseHouseCleanTitle extends HookConsumerWidget {
             child: Column(
               children: [
                 MyTextView(
-                  "Select House Clean",
+                 S.current.select_house_clean,
                   textColor: context.appColors.textBlack,
                   textAlign: TextAlign.left,
                   isFontBold: true,

+ 2 - 1
packages/cpt_services/lib/components/chooseVisitTimeBottomFooter.dart

@@ -2,6 +2,7 @@
 import 'package:cpt_services/components/chooseVisitTimeBottomFooter_vm.dart';
 import 'package:cpt_services/components/chooseVisitTimeContent_vm.dart';
 import 'package:cpt_services/components/status_card_item.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
@@ -86,7 +87,7 @@ class ChooseVisitTimeBottomFooter extends HookConsumerWidget {
               color: context.appColors.redDefault,
               child: Center(
                 child: MyTextView(
-                  'Confirm',
+                 S.current.confirm,
                   textColor: context.appColors.textWhite,
                   fontSize: 17,
                   isFontMedium: true,

+ 4 - 3
packages/cpt_services/lib/components/chooseVisitTimeContent.dart

@@ -5,6 +5,7 @@ import 'package:cpt_services/components/chooseVisitTimeBottomFooter_vm.dart';
 import 'package:cpt_services/components/chooseVisitTimeContent_vm.dart';
 import 'package:cpt_services/components/status_card_item.dart';
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
@@ -164,7 +165,7 @@ class ChooseVisitTimeContent extends HookConsumerWidget {
                 left: 0,
                 top: 0,
                 child: urgent.value? MyTextView(
-                  'Extreme speed',
+                 S.current.extreme_speed,
                   textColor: ColorUtils.string2Color("#DD6800"),
                   fontSize: 8,
                   isFontRegular: true,
@@ -183,7 +184,7 @@ class ChooseVisitTimeContent extends HookConsumerWidget {
                 left: 0,
                 bottom: 0,
                 child: night.value? MyTextView(
-                  'Night',
+                 S.current.night,
                   textColor: ColorUtils.string2Color("#FE4066"),
                   fontSize: 8,
                   isFontRegular: true,
@@ -202,7 +203,7 @@ class ChooseVisitTimeContent extends HookConsumerWidget {
                 right: 0,
                 bottom: 0,
                 child: holiday.value? MyTextView(
-                  'Holiday',
+                  S.current.holiday,
                   textColor: ColorUtils.string2Color("#37d7cc"),
                   fontSize: 8,
                   isFontRegular: true,

+ 2 - 1
packages/cpt_services/lib/components/chooseVisitTimeTitle.dart

@@ -3,6 +3,7 @@ import 'package:cpt_services/components/chooseHouseCleanContent_vm.dart';
 import 'package:cpt_services/components/chooseVisitTimeBottomFooter.dart';
 import 'package:cpt_services/components/chooseVisitTimeTitle_vm.dart';
 import 'package:cpt_services/modules/services/service_clean_detail/service_clean_detail_vm.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
@@ -47,7 +48,7 @@ class ChooseVisitTimeTitle extends HookConsumerWidget {
             child: Column(
               children: [
                 MyTextView(
-                  "Please choose a visit time",
+                  S.current.choose_visit_time,
                   textColor: context.appColors.textBlack,
                   textAlign: TextAlign.left,
                   isFontBold: true,

+ 4 - 3
packages/cpt_services/lib/components/status_card_item.dart

@@ -1,5 +1,6 @@
 import 'package:cpt_services/components/status_card_item_vm.dart';
 import 'package:cpt_services/modules/services/homeService/home_service_page.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:domain/entity/garage_sale_history_entity.dart';
 import 'package:flutter/cupertino.dart';
@@ -48,7 +49,7 @@ class StausCardItem extends HookConsumerWidget {
       height: cardHeight,
       alignment: Alignment.center,
       child: Padding(
-        padding: EdgeInsets.only(left: 18.0, right: 18.0, top: 10, bottom: 10.0),
+        padding: const EdgeInsets.only(left: 18.0, right: 18.0, top: 10, bottom: 10.0),
         child: Column(
           crossAxisAlignment: CrossAxisAlignment.start,
           children: [
@@ -121,7 +122,7 @@ class StausCardItem extends HookConsumerWidget {
                   mainAxisAlignment: MainAxisAlignment.spaceBetween,
                   children: [
                     MyTextView(
-                      'Visit Time',
+                      S.current.visit_time,
                       fontSize: 14,
                       maxLines: 1,
                       isFontRegular: true,
@@ -145,7 +146,7 @@ class StausCardItem extends HookConsumerWidget {
                   mainAxisAlignment: MainAxisAlignment.spaceBetween,
                   children: [
                     MyTextView(
-                      'Order Time',
+                      S.current.order_time,
                       fontSize: 14,
                       maxLines: 1,
                       isFontRegular: true,

+ 14 - 12
packages/cpt_services/lib/constants_services.dart

@@ -1,17 +1,19 @@
+import 'package:cs_resources/generated/l10n.dart';
+
 class servicesConstants {
    static Map<String, Map<String, dynamic>> servicesType = {
      "houseCleaning": {
-       "text": "House Cleaning",
+       "text": S.current.house_cleaning,
        "type": "paid",
        'code': "House Cleaning",  // 业务做 标识 字段
      },
      "airConditioner": {
-       "text": "Air Conditioning Cleaning",
+       "text": S.current.air_conditioning_cleaning,
        "type": "paid",
        'code': "Air Conditioning Cleaning", // 业务做 标识 字段
      },
      "repairAirConditioner": {
-       "text": "Maintenance",
+       "text": S.current.maintenance,
        "type": "inquiry",
        'code': "Repair air Conditioner",  // 业务做 标识 字段
      }
@@ -19,22 +21,22 @@ class servicesConstants {
 
    static Map<String, dynamic> servicesStatus = {
      "0": {
-       "text": "Pending",
+       "text": S.current.pending,
        "type": "pending",
        'code': 0,
      },
      "1": {
-       "text": "In Progress",
+       "text": S.current.in_progress,
        "type": "inProgress",
        'code': 1,
      },
      "2": {
-       "text": "completed",
+       "text": S.current.completed,
        "type": "completed",
        'code': 2,
      },
      "3": {
-       "text": "canceled",
+       "text": S.current.canceled,
        "type": "canceled",
        'code': 3,
      }
@@ -63,7 +65,7 @@ class servicesConstants {
 
   static Map<String, dynamic> actionBtn = {
      "0": {
-       "text": "Cancel",
+       "text": S.current.cancel,
        "type": "cancel",
        'code': 0,
        'btnColor': '#FFFE6C00',
@@ -71,7 +73,7 @@ class servicesConstants {
        'btnHeight': 35.0,
      },
      "1": {
-       "text": "Contact Merchant",
+       "text": S.current.contact_merchant,
        "type": "contactMerchant",
        'code': 1,
        'btnColor': '#FF4161D0',
@@ -79,7 +81,7 @@ class servicesConstants {
        'btnHeight': 35.0,
      },
     "2": {
-      "text": "Contact Service Personnel",
+      "text": S.current.contact_service_personnel,
       "type": "contactServicePersonnel",
       'code': 2,
       'btnColor': '#FF01CA48',
@@ -87,7 +89,7 @@ class servicesConstants {
       'btnHeight': 35.0,
     },
     "3": {
-      "text": "Delete",
+      "text": S.current.delete,
       "type": "delete",
       'code': 3,
       'btnColor': '#FFFE4066',
@@ -95,7 +97,7 @@ class servicesConstants {
       'btnHeight': 30.0,
     },
     "4": {
-      "text": "Evaluate",
+      "text": S.current.evaluate,
       "type": "evaluate",
       'code': 4,
       'btnColor': '#FF4161D0',

+ 7 - 23
packages/cpt_services/lib/modules/services/clean_order_cancel_success/clean_order_cancel_success_page.dart

@@ -1,28 +1,16 @@
-import 'package:cs_resources/generated/assets.dart';
-import 'package:domain/entity/garage_sale_rent_entity.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter/rendering.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
-import 'package:plugin_basic/provider/app_config/app_config_service.dart';
-import 'package:router/componentRouter/component_service_manager.dart';
 import 'package:router/ext/auto_router_extensions.dart';
 import 'package:shared/utils/color_utils.dart';
-import 'package:shared/utils/ext_dart.dart';
-import 'package:shared/utils/log_utils.dart';
-import 'package:shared/utils/screen_util.dart';
-import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_button.dart';
-import 'package:widgets/my_load_image.dart';
-import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
-import 'package:widgets/widget_export.dart';
-
 import '../../../router/page/services_page_router.dart';
-import '../homeService/home_service_page.dart';
 
 @RoutePage()
 class CleanOrderCancelSuccessPage extends HookConsumerWidget {
@@ -39,12 +27,10 @@ class CleanOrderCancelSuccessPage extends HookConsumerWidget {
     }
   }
 
-
   @override
   Widget build(BuildContext context, WidgetRef ref) {
     // final appConfigState = ref.watch(appConfigServiceProvider)
 
-
     useEffect(() {
       // 组件挂载时执行 - 执行接口请求
       // Future.microtask(() => vm.initPageData());
@@ -57,7 +43,7 @@ class CleanOrderCancelSuccessPage extends HookConsumerWidget {
     return Scaffold(
         appBar: MyAppBar.appBar(
           context,
-          "Cancellation of Order",
+          S.current.cancellation_of_order,
           backgroundColor: context.appColors.whiteBG,
         ),
         backgroundColor: ColorUtils.string2Color("#F2F3F6"),
@@ -69,7 +55,7 @@ class CleanOrderCancelSuccessPage extends HookConsumerWidget {
               crossAxisAlignment: CrossAxisAlignment.center,
               children: [
                 MyTextView(
-                  "The cancellation order has been submitted and we will confirm it as soon as possible. Thank you for your support.",
+                  S.current.cancel_order_success,
                   fontSize: 15,
                   isFontRegular: true,
                   boxWidth: 270,
@@ -79,8 +65,8 @@ class CleanOrderCancelSuccessPage extends HookConsumerWidget {
                   marginBottom: 50,
                 ),
                 MyButton(
-                  text: "Back Home",
-                  onPressed: (){
+                  text: S.current.back_home,
+                  onPressed: () {
                     // 回到首页
                     context.router.maybePop();
                   },
@@ -94,8 +80,6 @@ class CleanOrderCancelSuccessPage extends HookConsumerWidget {
               ],
             ),
           ),
-        )
-    );
+        ));
   }
-
-}
+}

+ 4 - 3
packages/cpt_services/lib/modules/services/clean_order_detail/cancelOrderDialogContent.dart

@@ -4,6 +4,7 @@ import 'package:auto_route/src/route/page_route_info.dart';
 import 'package:cpt_services/components/chooseVisitTimeBottomFooter.dart';
 import 'package:cpt_services/modules/services/clean_order_detail/clean_order_detail_vm.dart';
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/widgets.dart';
@@ -34,11 +35,11 @@ class CancelOrderDialogContent extends HookConsumerWidget {
         crossAxisAlignment: CrossAxisAlignment.start,
         children: [
           MyTextView(
-            "Reason for canceling the order:",
+            S.current.canceling_reason,
             fontSize: 17,
             isFontBold: true,
           ),
-          Container(
+          SizedBox(
             height: 175,
             child: _buildTextAreaLayout(context, vm, ref, 'reason'),
           ),
@@ -46,7 +47,7 @@ class CancelOrderDialogContent extends HookConsumerWidget {
             mainAxisAlignment: MainAxisAlignment.start,
             children: [
               MyTextView(
-                "Please contact the service provider for confirmation before canceling the order.",
+                S.current.confirm_service_provider,
                 isFontRegular: true,
                 fontSize: 15,
                 maxLines: 9999,

+ 8 - 8
packages/cpt_services/lib/modules/services/clean_order_detail/clean_order_detail_page.dart

@@ -76,7 +76,7 @@ class CleanOrderDetailPage extends HookConsumerWidget {
     return Scaffold(
       appBar: MyAppBar.appBar(
         context,
-        "Order Details",
+        S.current.order_details,
         backgroundColor: context.appColors.whiteBG,
       ),
       backgroundColor: ColorUtils.string2Color("#F2F3F6"),
@@ -320,7 +320,7 @@ class CleanOrderDetailPage extends HookConsumerWidget {
               width: 10,
             ),
             MyTextView(
-              'Service',
+              S.current.service,
               fontSize: 17,
               isFontBold: true,
               textColor: context.appColors.textBlack,
@@ -435,7 +435,7 @@ class CleanOrderDetailPage extends HookConsumerWidget {
           width: 10,
         ),
         MyTextView(
-          'Total Amount',
+         S.current.total_amount,
           fontSize: 17,
           isFontBold: true,
           textColor: context.appColors.textBlack,
@@ -470,7 +470,7 @@ class CleanOrderDetailPage extends HookConsumerWidget {
               width: 10,
             ),
             MyTextView(
-              'Visit Time',
+             S.current.visit_time,
               fontSize: 17,
               isFontBold: true,
               textColor: context.appColors.textBlack,
@@ -510,7 +510,7 @@ class CleanOrderDetailPage extends HookConsumerWidget {
         crossAxisAlignment: CrossAxisAlignment.start,
         children: [
           MyTextView(
-            'CARD',
+            S.current.card_caps,
             fontSize: 17,
             isFontMedium: true,
             textColor: context.appColors.textPrimary,
@@ -542,7 +542,7 @@ class CleanOrderDetailPage extends HookConsumerWidget {
                 onPressed: () {
                   ComponentServiceManager().paymentService.startChooseCardPage();
                 },
-                text: 'Change',
+                text: S.current.change,
                 minWidth: 80,
                 minHeight: 30,
                 textColor: context.appColors.textWhite,
@@ -575,7 +575,7 @@ class CleanOrderDetailPage extends HookConsumerWidget {
             //   width: 10,
             // ),
             MyTextView(
-              'Remarks Information',
+              S.current.remarks_information,
               fontSize: 17,
               isFontBold: true,
               textColor: context.appColors.textBlack,
@@ -619,7 +619,7 @@ class CleanOrderDetailPage extends HookConsumerWidget {
           mainAxisAlignment: MainAxisAlignment.start,
           children: [
             MyTextView(
-              'Service Rules',
+              S.current.service_rules,
               fontSize: 17,
               isFontBold: true,
               textColor: context.appColors.textBlack,

+ 4 - 3
packages/cpt_services/lib/modules/services/clean_order_detail/clean_order_detail_vm.dart

@@ -4,6 +4,7 @@ import 'package:cpt_services/components/chooseVisitTimeContent.dart';
 import 'package:cpt_services/components/chooseVisitTimeContent_vm.dart';
 import 'package:cpt_services/components/chooseVisitTimeTitle.dart';
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:domain/entity/garage_sale_rent_entity.dart';
 import 'package:domain/entity/newsfeed_detail_entity.dart';
@@ -171,8 +172,8 @@ class CleanOrderDetailVm extends _$CleanOrderDetailVm with DioCancelableMixin {
           dialogWidth: 340.0,
           isShowConfirmBtn: false,
           isShowCancelBtn: false,
-          confirmTxt: "Confirm",
-          title: "Cancellation of Order",
+          confirmTxt: S.current.confirm,
+          title: S.current.cancellation_of_order,
           titleBackgroundColor: context.appColors.textPrimary,
           closeIconColor: context.appColors.textWhite,
           titleTextStyle: TextStyle(
@@ -189,7 +190,7 @@ class CleanOrderDetailVm extends _$CleanOrderDetailVm with DioCancelableMixin {
                   // 提交取消订单
                   submitCancelOrder(context);
                 },
-                text: "Confirm",
+                text: S.current.confirm,
                 minWidth: 305,
                 minHeight: 45,
                 fontSize: 16,

+ 3 - 2
packages/cpt_services/lib/modules/services/homeService/home_service_page.dart

@@ -1,4 +1,5 @@
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:domain/entity/garage_sale_rent_entity.dart';
 import 'package:domain/entity/paid_service_entity.dart';
 import 'package:flutter/material.dart';
@@ -177,7 +178,7 @@ class HomeServicePage extends HookConsumerWidget {
           Row(
             children: [
               MyTextView(
-                "Sort",
+                S.current.sort,
                 fontSize: 15,
                 isFontRegular: true,
                 textAlign: TextAlign.center,
@@ -188,7 +189,7 @@ class HomeServicePage extends HookConsumerWidget {
                   Row(
                     children: [
                       sortTitle != null? MyTextView(
-                        "${sortTitle}",
+                        sortTitle,
                         fontSize: 13,
                         isFontRegular: true,
                         textAlign: TextAlign.center,

+ 1 - 1
packages/cpt_services/lib/modules/services/inProgress/in_progress_page.dart

@@ -125,7 +125,7 @@ class InProgressPage extends HookConsumerWidget {
       ),
       child: StausCardItem(
         key: UniqueKey(),
-        cardHeight: 130.0,
+        cardHeight: 135.0,
         item: item,
         onClickCard: (dynamic value) async {
           // Log.d("点击了喜欢按钮  --id:${item['id']}- $collectionValue");

+ 1 - 1
packages/cpt_services/lib/modules/services/repair/repair_page.dart

@@ -224,10 +224,10 @@ class RepairPage extends HookConsumerWidget with WidgetsBindingObserver {
                     type: ClickType.throttle,
                   ),
                 ),
-                SizedBox.fromSize(size: const Size(0, 9)),
                 MyTextView(
                   item['title'],
                   fontSize: 15,
+                  marginTop: 8,
                   textColor: index == currentPageIdx ? ColorUtils.string2Color('#4161D0'): context.appColors.textBlack,
                   textAlign: TextAlign.center,
                   isFontMedium: true,

+ 0 - 0
packages/cpt_services/lib/modules/services/repair/repair_state.dart


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików