update theme

This commit is contained in:
Phuoc Nguyen
2025-12-02 15:20:54 +07:00
parent 12bd70479c
commit 49a41d24eb
78 changed files with 3263 additions and 2756 deletions

View File

@@ -7,7 +7,6 @@ library;
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:worker/core/constants/ui_constants.dart';
import 'package:worker/core/theme/colors.dart';
/// Account Menu Item Widget
///
@@ -51,6 +50,8 @@ class AccountMenuItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
final colorScheme = Theme.of(context).colorScheme;
return InkWell(
onTap: onTap,
child: Container(
@@ -58,9 +59,9 @@ class AccountMenuItem extends StatelessWidget {
horizontal: AppSpacing.md,
vertical: AppSpacing.md,
),
decoration: const BoxDecoration(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: AppColors.grey100, width: 1.0),
bottom: BorderSide(color: colorScheme.outlineVariant, width: 1.0),
),
),
child: Row(
@@ -70,16 +71,14 @@ class AccountMenuItem extends StatelessWidget {
width: 40,
height: 40,
decoration: BoxDecoration(
color:
iconBackgroundColor ??
AppColors.lightBlue.withValues(alpha: 0.1),
color: iconBackgroundColor ?? colorScheme.primaryContainer,
shape: BoxShape.circle,
),
child: Center(
child: FaIcon(
icon,
size: 18,
color: iconColor ?? AppColors.primaryBlue,
color: iconColor ?? colorScheme.primary,
),
),
),
@@ -92,19 +91,19 @@ class AccountMenuItem extends StatelessWidget {
children: [
Text(
title,
style: const TextStyle(
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w500,
color: AppColors.grey900,
color: colorScheme.onSurface,
),
),
if (subtitle != null) ...[
const SizedBox(height: 4),
Text(
subtitle!,
style: const TextStyle(
style: TextStyle(
fontSize: 13,
color: AppColors.grey500,
color: colorScheme.onSurfaceVariant,
),
),
],
@@ -114,10 +113,10 @@ class AccountMenuItem extends StatelessWidget {
// Trailing widget (default: chevron)
trailing ??
const FaIcon(
FaIcon(
FontAwesomeIcons.chevronRight,
size: 18,
color: AppColors.grey500,
color: colorScheme.onSurfaceVariant,
),
],
),

View File

@@ -41,25 +41,27 @@ class AddressCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final colorScheme = Theme.of(context).colorScheme;
return Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
color: colorScheme.surface,
borderRadius: BorderRadius.circular(AppRadius.card),
border: isDefault
? Border.all(color: AppColors.primaryBlue, width: 2)
? Border.all(color: colorScheme.primary, width: 2)
: null,
boxShadow: isDefault
? [
BoxShadow(
color: AppColors.primaryBlue.withValues(alpha: 0.15),
color: colorScheme.primary.withValues(alpha: 0.15),
blurRadius: 12,
offset: const Offset(0, 4),
),
]
: [
BoxShadow(
color: Colors.black.withValues(alpha: 0.05),
color: colorScheme.shadow.withValues(alpha: 0.05),
blurRadius: 8,
offset: const Offset(0, 2),
),
@@ -78,7 +80,7 @@ class AddressCard extends StatelessWidget {
value: true,
groupValue: isSelected,
onChanged: (_) => onRadioTap?.call(),
activeColor: AppColors.primaryBlue,
activeColor: colorScheme.primary,
),
),
),
@@ -94,10 +96,10 @@ class AddressCard extends StatelessWidget {
Flexible(
child: Text(
name,
style: const TextStyle(
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Color(0xFF212121),
color: colorScheme.onSurface,
),
overflow: TextOverflow.ellipsis,
),
@@ -110,15 +112,15 @@ class AddressCard extends StatelessWidget {
vertical: 2,
),
decoration: BoxDecoration(
color: AppColors.primaryBlue,
color: colorScheme.primary,
borderRadius: BorderRadius.circular(4),
),
child: const Text(
child: Text(
'Mặc định',
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w500,
color: Colors.white,
color: colorScheme.onPrimary,
),
),
)
@@ -133,18 +135,18 @@ class AddressCard extends StatelessWidget {
),
decoration: BoxDecoration(
border: Border.all(
color: AppColors.primaryBlue.withValues(
color: colorScheme.primary.withValues(
alpha: 0.3,
),
),
borderRadius: BorderRadius.circular(4),
),
child: const Text(
child: Text(
'Đặt mặc định',
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w500,
color: AppColors.primaryBlue,
color: colorScheme.primary,
),
),
),
@@ -157,9 +159,9 @@ class AddressCard extends StatelessWidget {
// Phone
Text(
phone,
style: const TextStyle(
style: TextStyle(
fontSize: 14,
color: AppColors.grey500,
color: colorScheme.onSurfaceVariant,
),
),
@@ -168,9 +170,9 @@ class AddressCard extends StatelessWidget {
// Address Text
Text(
address,
style: const TextStyle(
style: TextStyle(
fontSize: 14,
color: Color(0xFF212121),
color: colorScheme.onSurface,
height: 1.4,
),
),
@@ -194,14 +196,14 @@ class AddressCard extends StatelessWidget {
width: 36,
height: 36,
decoration: BoxDecoration(
border: Border.all(color: const Color(0xFFE2E8F0)),
border: Border.all(color: colorScheme.outlineVariant),
borderRadius: BorderRadius.circular(8),
),
child: const Center(
child: Center(
child: FaIcon(
FontAwesomeIcons.penToSquare,
size: 16,
color: AppColors.primaryBlue,
color: colorScheme.primary,
),
),
),
@@ -221,7 +223,7 @@ class AddressCard extends StatelessWidget {
width: 36,
height: 36,
decoration: BoxDecoration(
border: Border.all(color: const Color(0xFFE2E8F0)),
border: Border.all(color: colorScheme.outlineVariant),
borderRadius: BorderRadius.circular(8),
),
child: const Center(