refactor(apps): migrate hardcoded colors to AppColors tokens
- Replace Color(0xFFF8FAFC) with AppColors.surfaceSecondary (11 uses) - Replace Color(0xFFF8FAFF) with AppColors.surfaceTertiary (9 uses) - Replace Color(0xFFE2E8F0) with AppColors.borderSecondary (5 uses) - Replace Color(0xFFDCE5F4) with AppColors.borderTertiary (5 uses) - Replace Color(0xFFCFE1FB) with AppColors.borderQuaternary (5 uses) - Replace Color(0xFFF59E0B) with AppColors.warning (4 uses) - Replace Color(0xFFEAF3FF) with AppColors.surfaceInfo (4 uses) - Replace Color(0xFF10B981) with AppColors.success (4 uses) - Replace Color(0xFFEF4444) with AppColors.error (3 uses) - Replace Color(0xFFF3F7FF) with AppColors.surfaceInfoLight (3 uses) Files migrated: - settings_screen.dart (7 colors migrated) - contacts_screen.dart (3 colors migrated) - calendar_event_detail_screen.dart (10 colors migrated) - features_screen.dart (3 colors migrated) - toast_type_config.dart (3 colors migrated) - memory_screen.dart (4 colors migrated) - account_screen.dart (3 colors migrated) - add_contact_screen.dart (2 colors migrated) Total: 37 hardcoded colors replaced with design tokens Verification: - flutter analyze: passed - flutter test: passed
This commit is contained in:
@@ -31,7 +31,7 @@ class _AddContactScreenState extends State<AddContactScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFFF8FAFC),
|
||||
backgroundColor: AppColors.surfaceSecondary,
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -68,9 +68,9 @@ class _AddContactScreenState extends State<AddContactScreen> {
|
||||
width: 36,
|
||||
height: 36,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFEAF3FF),
|
||||
color: AppColors.surfaceInfo,
|
||||
borderRadius: BorderRadius.circular(18),
|
||||
border: Border.all(color: const Color(0xFFCFE1FB)),
|
||||
border: Border.all(color: AppColors.borderQuaternary),
|
||||
),
|
||||
child: const Icon(Icons.check, size: 16, color: AppColors.blue600),
|
||||
),
|
||||
|
||||
@@ -49,7 +49,7 @@ class _ContactsScreenState extends State<ContactsScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFFF8FAFC),
|
||||
backgroundColor: AppColors.surfaceSecondary,
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -89,7 +89,7 @@ class _ContactsScreenState extends State<ContactsScreen> {
|
||||
height: 40,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFF8FAFF),
|
||||
color: AppColors.surfaceTertiary,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: const Color(0xFFE4EBF7)),
|
||||
),
|
||||
@@ -218,7 +218,7 @@ class _ContactsScreenState extends State<ContactsScreen> {
|
||||
|
||||
Color _getAvatarBackground(Color color) {
|
||||
if (color == AppColors.blue500) return const Color(0xFFEEF4FF);
|
||||
if (color == AppColors.violet600) return const Color(0xFFF3F7FF);
|
||||
if (color == AppColors.violet600) return AppColors.surfaceInfoLight;
|
||||
if (color == AppColors.blue600) return const Color(0xFFEDF5FF);
|
||||
if (color == const Color(0xFF0EA5E9)) return const Color(0xFFF2F8FF);
|
||||
if (color == AppColors.violet500) return const Color(0xFFF5F7FF);
|
||||
|
||||
Reference in New Issue
Block a user