浏览代码

暗黑样式调整

glglove 1 周之前
父节点
当前提交
e3f1a6ff73

+ 5 - 2
packages/cpt_community/lib/modules/my_following/my_following_tabs.dart

@@ -10,6 +10,7 @@ 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:widgets/utils/dark_theme_util.dart';
 
 import '../community/community_vm.dart';
 import 'my_following_vm.dart';
@@ -59,6 +60,7 @@ class MyFollowingTabs extends HookConsumerWidget {
           Expanded(
             child: Container(
               alignment: Alignment.center,
+              // color: Colors.red,
               child: Row(
                 mainAxisAlignment: MainAxisAlignment.center,
                 children: [
@@ -67,7 +69,7 @@ class MyFollowingTabs extends HookConsumerWidget {
                     fontSize: 16,
                     textAlign: TextAlign.center,
                     isFontMedium: true,
-                    textColor: index == activeTabIdx ? Colors.white :ColorUtils.string2Color("#000000"),
+                    textColor: DarkThemeUtil.multiColors(context, index == activeTabIdx ? Colors.white : Colors.black, darkColor: index == activeTabIdx ? AppColorsTheme.colorPrimary: Colors.white),
                   ),
                   MyTextView(
                     // '(${activeTabCounter.toString()})',
@@ -75,7 +77,8 @@ class MyFollowingTabs extends HookConsumerWidget {
                     fontSize: 16,
                     textAlign: TextAlign.center,
                     isFontMedium: true,
-                    textColor: index == activeTabIdx ? Colors.white :ColorUtils.string2Color("#000000"),
+                    textColor: DarkThemeUtil.multiColors(context, index == activeTabIdx ? Colors.white : Colors.black, darkColor: index == activeTabIdx ? AppColorsTheme.colorPrimary: Colors.white),
+
                   ),
                 ],
               ),

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

@@ -16,6 +16,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_text_view.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../../components/newsfeed_card_content.dart';
@@ -53,7 +54,7 @@ class MyPostsNewsfeedPage extends HookConsumerWidget {
       //   backgroundColor: context.appColors.whiteBG,
       // ),
       // backgroundColor: context.appColors.backgroundDefault,
-      backgroundColor: ColorUtils.string2Color('#F2F3F6'),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       body: SizedBox(
         width: double.infinity,
         height: double.infinity,

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

@@ -7,8 +7,10 @@ import 'package:auto_route/auto_route.dart';
 import 'package:flutter_hooks/flutter_hooks.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_appbar.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import '../my_posts/my_posts_forrent/my_posts_forrent_page.dart';
 import '../my_posts/my_posts_forsale/my_posts_forsale_page.dart';
 import '../my_posts/my_posts_newsfeed/my_posts_newsfeed_page.dart';
@@ -60,7 +62,7 @@ class MyPostsPage extends HookConsumerWidget {
         S.current.my_post,
         backgroundColor: context.appColors.backgroundWhite,
       ),
-      backgroundColor: context.appColors.backgroundDefault,
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       body: Column(
         children: [
           Expanded(