Browse Source

主题色值的修改

liukai 1 week ago
parent
commit
4ad22271e9

+ 1 - 0
packages/cpt_auth/lib/modules/auth_login/auth_login_page.dart

@@ -179,6 +179,7 @@ class AuthLoginPage extends HookConsumerWidget {
                 children: [
                   MyAssetImage(
                     state.isAgreeTerms ? Assets.baseServiceCheckBoxChecked : Assets.baseServiceCheckBoxUncheck,
+                    color: state.isAgreeTerms ? context.appColors.textPrimary : Colors.transparent,
                     width: 15.5,
                     height: 15.5,
                   ).onTap(viewModel.switchAgreeTerms, padding: 10),

+ 1 - 1
packages/cpt_auth/lib/modules/auth_login/auth_login_state.dart

@@ -37,7 +37,7 @@ class LoginState {
               'account': {
                 'value': '',
                 'controller': TextEditingController(),
-                'hintText': S.current.phone_email,
+                'hintText': S.current.mobile_phone,
                 'focusNode': FocusNode(),
                 'obsecure': false,
               },

+ 1 - 0
packages/cpt_auth/lib/modules/sign_up/sign_up_page.dart

@@ -219,6 +219,7 @@ class SignUpPage extends HookConsumerWidget {
                 children: [
                   MyAssetImage(
                     state.isAgreeTerms ? Assets.baseServiceCheckBoxChecked : Assets.baseServiceCheckBoxUncheck,
+                    color: state.isAgreeTerms ? context.appColors.textPrimary : Colors.transparent,
                     width: 15.5,
                     height: 15.5,
                   ).onTap(viewModel.switchAgreeTerms, padding: 10),

+ 1 - 1
packages/cs_resources/lib/theme/app_colors_theme.dart

@@ -12,7 +12,7 @@ extension AppColorsThemeExtensions on BuildContext {
 class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   //亮色主题的自定义颜色值
   static const color666666 = Color(0xFF666666);
-  static const _colorPrimary = Color(0xFF4161D0);
+  static const _colorPrimary = Color(0xFF01B5EB);
   static const _colorFF5E75 = Color(0xFFFF5E75);
   static const _colorFCFCFC = Color(0xFFFCFCFC);
   static const _colorD7DBE7 = Color(0xffD7DBE7);

+ 11 - 3
packages/cs_widgets/lib/shatter/custom_check_box.dart

@@ -1,5 +1,6 @@
 import 'package:cs_resources/constants/color_constants.dart';
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
@@ -12,7 +13,8 @@ class CustomCheckBox extends StatefulWidget {
   final List<String> selectedOptions; // 已选中的选项列表
   final Color textColor;
 
-  const CustomCheckBox({super.key,
+  const CustomCheckBox({
+    super.key,
     required this.options,
     required this.onOptionsSelected,
     required this.selectedOptions,
@@ -62,7 +64,6 @@ class _CustomCheckBoxState extends State<CustomCheckBox> {
     return true;
   }
 
-
   @override
   Widget build(BuildContext context) {
     return Wrap(
@@ -73,6 +74,7 @@ class _CustomCheckBoxState extends State<CustomCheckBox> {
         String option = entry.value;
         return _buildCheckBoxWithIconAndText(
           path: _selectedIndexes.contains(index) ? Assets.baseServiceCheckBoxChecked : Assets.baseServiceCheckBoxUncheck,
+          iconColor: _selectedIndexes.contains(index) ? context.appColors.textPrimary : Colors.transparent,
           text: option,
           value: _selectedIndexes.contains(index),
           onChanged: (isChecked) {
@@ -96,6 +98,7 @@ class _CustomCheckBoxState extends State<CustomCheckBox> {
 
   Widget _buildCheckBoxWithIconAndText({
     required String path,
+    Color? iconColor,
     required String text,
     required bool value,
     required Function(bool) onChanged,
@@ -103,7 +106,12 @@ class _CustomCheckBoxState extends State<CustomCheckBox> {
     return Row(
       mainAxisSize: MainAxisSize.min,
       children: <Widget>[
-        MyAssetImage(path, width: 15.5, height: 15.5),
+        MyAssetImage(
+          path,
+          color: iconColor,
+          width: 15.5,
+          height: 15.5,
+        ),
         const SizedBox(width: 10),
         MyTextView(
           text,