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:
@@ -8,7 +8,7 @@ class CalendarEventDetailScreen extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFFF8FAFC),
|
||||
backgroundColor: AppColors.surfaceSecondary,
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -34,7 +34,7 @@ class CalendarEventDetailScreen extends StatelessWidget {
|
||||
width: 36,
|
||||
height: 36,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFF8FAFF),
|
||||
color: AppColors.surfaceTertiary,
|
||||
borderRadius: BorderRadius.circular(18),
|
||||
border: Border.all(color: const Color(0xFFDEE7F6)),
|
||||
),
|
||||
@@ -115,9 +115,9 @@ class CalendarEventDetailScreen extends StatelessWidget {
|
||||
width: 36,
|
||||
height: 36,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFF8FAFF),
|
||||
color: AppColors.surfaceTertiary,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: const Color(0xFFDCE5F4)),
|
||||
border: Border.all(color: AppColors.borderTertiary),
|
||||
),
|
||||
child: const Icon(
|
||||
LucideIcons.pencil,
|
||||
@@ -190,11 +190,11 @@ class CalendarEventDetailScreen extends StatelessWidget {
|
||||
const SizedBox(width: 10),
|
||||
_buildColorOption(const Color(0xFF8B5CF6)),
|
||||
const SizedBox(width: 10),
|
||||
_buildColorOption(const Color(0xFF10B981)),
|
||||
_buildColorOption(AppColors.success),
|
||||
const SizedBox(width: 10),
|
||||
_buildColorOption(const Color(0xFFF59E0B)),
|
||||
_buildColorOption(AppColors.warning),
|
||||
const SizedBox(width: 10),
|
||||
_buildColorOption(const Color(0xFFEF4444)),
|
||||
_buildColorOption(AppColors.error),
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -237,7 +237,7 @@ class CalendarEventDetailScreen extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFDFEFF),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: const Color(0xFFDCE5F4)),
|
||||
border: Border.all(color: AppColors.borderTertiary),
|
||||
),
|
||||
child: const Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -262,7 +262,7 @@ class CalendarEventDetailScreen extends StatelessWidget {
|
||||
return Container(
|
||||
height: 80,
|
||||
padding: const EdgeInsets.all(16),
|
||||
color: const Color(0xFFF8FAFC),
|
||||
color: AppColors.surfaceSecondary,
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
@@ -271,7 +271,7 @@ class CalendarEventDetailScreen extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(18),
|
||||
border: Border.all(color: const Color(0xFFE2E8F0)),
|
||||
border: Border.all(color: AppColors.borderSecondary),
|
||||
),
|
||||
child: const Icon(
|
||||
LucideIcons.plus,
|
||||
|
||||
Reference in New Issue
Block a user