refactoring

This commit is contained in:
dahoud
2026-03-31 09:14:47 +00:00
parent 9bfffeeebe
commit 5383df6dcb
200 changed files with 11192 additions and 7063 deletions

View File

@@ -183,7 +183,7 @@ class ActivityItem extends StatelessWidget {
children: [
if (showStatusIndicator) ...[
Container(
padding: const EdgeInsets.all(6),
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
color: effectiveColor.withOpacity(0.1),
shape: BoxShape.circle,
@@ -191,7 +191,7 @@ class ActivityItem extends StatelessWidget {
child: Icon(
effectiveIcon,
color: effectiveColor,
size: 16,
size: 14,
),
),
const SizedBox(width: 12),
@@ -242,15 +242,15 @@ class ActivityItem extends StatelessWidget {
Row(
children: [
Container(
padding: const EdgeInsets.all(8),
padding: const EdgeInsets.all(6),
decoration: BoxDecoration(
color: effectiveColor.withOpacity(0.1),
borderRadius: BorderRadius.circular(8),
borderRadius: BorderRadius.circular(6),
),
child: Icon(
effectiveIcon,
color: effectiveColor,
size: 18,
size: 14,
),
),
const SizedBox(width: 12),
@@ -258,7 +258,7 @@ class ActivityItem extends StatelessWidget {
child: Text(
title,
style: const TextStyle(
fontSize: 16,
fontSize: 13,
fontWeight: FontWeight.w600,
color: Color(0xFF1F2937),
),
@@ -409,26 +409,12 @@ class ActivityItem extends StatelessWidget {
case ActivityItemStyle.normal:
return BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.02),
blurRadius: 4,
offset: const Offset(0, 1),
),
],
borderRadius: BorderRadius.circular(6),
);
case ActivityItemStyle.detailed:
return BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
blurRadius: 8,
offset: const Offset(0, 2),
),
],
borderRadius: BorderRadius.circular(8),
);
case ActivityItemStyle.alert:
return BoxDecoration(

View File

@@ -52,9 +52,9 @@ class SectionHeader extends StatelessWidget {
this.action,
this.icon,
}) : color = ColorTokens.primary,
fontSize = 20,
fontSize = 16,
style = SectionHeaderStyle.primary,
bottomSpacing = 16;
bottomSpacing = 10;
/// Constructeur pour un en-tête de section
const SectionHeader.section({
@@ -64,9 +64,9 @@ class SectionHeader extends StatelessWidget {
this.action,
this.icon,
}) : color = ColorTokens.primary,
fontSize = 16,
fontSize = 13,
style = SectionHeaderStyle.normal,
bottomSpacing = 12;
bottomSpacing = 8;
/// Constructeur pour un en-tête de sous-section
const SectionHeader.subsection({
@@ -106,7 +106,7 @@ class SectionHeader extends StatelessWidget {
final effectiveColor = color ?? ColorTokens.primary;
return Container(
padding: const EdgeInsets.all(SpacingTokens.lg),
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
@@ -117,21 +117,20 @@ class SectionHeader extends StatelessWidget {
end: Alignment.bottomRight,
),
borderRadius: BorderRadius.circular(SpacingTokens.radiusLg),
boxShadow: ShadowTokens.primary,
),
child: Row(
children: [
if (icon != null) ...[
Container(
padding: const EdgeInsets.all(8),
padding: const EdgeInsets.all(6),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.2),
borderRadius: BorderRadius.circular(8),
borderRadius: BorderRadius.circular(6),
),
child: Icon(
icon,
color: Colors.white,
size: 20,
size: 16,
),
),
const SizedBox(width: 12),
@@ -143,7 +142,7 @@ class SectionHeader extends StatelessWidget {
Text(
title,
style: TextStyle(
fontSize: fontSize ?? 20,
fontSize: fontSize ?? 16,
fontWeight: FontWeight.bold,
color: Colors.white,
),
@@ -186,7 +185,7 @@ class SectionHeader extends StatelessWidget {
Text(
title,
style: TextStyle(
fontSize: fontSize ?? 16,
fontSize: fontSize ?? 13,
fontWeight: FontWeight.bold,
color: color ?? ColorTokens.primary,
),
@@ -239,17 +238,10 @@ class SectionHeader extends StatelessWidget {
/// En-tête avec fond de carte
Widget _buildCardHeader() {
return Container(
padding: const EdgeInsets.all(12),
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
blurRadius: 4,
offset: const Offset(0, 2),
),
],
),
child: Row(
children: [
@@ -268,7 +260,7 @@ class SectionHeader extends StatelessWidget {
Text(
title,
style: TextStyle(
fontSize: fontSize ?? 16,
fontSize: fontSize ?? 13,
fontWeight: FontWeight.bold,
color: color ?? ColorTokens.primary,
),

View File

@@ -136,12 +136,12 @@ class StatCard extends StatelessWidget {
Row(
children: [
Container(
padding: const EdgeInsets.all(8),
padding: const EdgeInsets.all(7),
decoration: BoxDecoration(
color: color.withOpacity(0.1),
borderRadius: BorderRadius.circular(8),
),
child: Icon(icon, color: color, size: 20),
child: Icon(icon, color: color, size: 16),
),
const Spacer(),
Column(
@@ -152,7 +152,7 @@ class StatCard extends StatelessWidget {
style: TextStyle(
fontWeight: FontWeight.bold,
color: color,
fontSize: 20,
fontSize: 16,
),
),
if (subtitle.isNotEmpty)
@@ -167,13 +167,13 @@ class StatCard extends StatelessWidget {
),
],
),
const SizedBox(height: 12),
const SizedBox(height: 8),
Text(
title,
style: const TextStyle(
fontWeight: FontWeight.w600,
color: Color(0xFF1F2937),
fontSize: 14,
fontSize: 13,
),
),
],
@@ -188,12 +188,12 @@ class StatCard extends StatelessWidget {
Row(
children: [
Container(
padding: const EdgeInsets.all(12),
padding: const EdgeInsets.all(7),
decoration: BoxDecoration(
color: color.withOpacity(0.1),
borderRadius: BorderRadius.circular(12),
borderRadius: BorderRadius.circular(8),
),
child: Icon(icon, color: color, size: 24),
child: Icon(icon, color: color, size: 16),
),
const Spacer(),
Column(
@@ -204,7 +204,7 @@ class StatCard extends StatelessWidget {
style: TextStyle(
fontWeight: FontWeight.bold,
color: color,
fontSize: 24,
fontSize: 18,
),
),
if (subtitle.isNotEmpty)
@@ -219,13 +219,13 @@ class StatCard extends StatelessWidget {
),
],
),
const SizedBox(height: 16),
const SizedBox(height: 8),
Text(
title,
style: const TextStyle(
fontWeight: FontWeight.w600,
color: Color(0xFF1F2937),
fontSize: 16,
fontSize: 13,
),
),
],
@@ -240,7 +240,7 @@ class StatCard extends StatelessWidget {
case StatCardSize.normal:
return const EdgeInsets.all(12);
case StatCardSize.large:
return const EdgeInsets.all(16);
return const EdgeInsets.all(10);
}
}
@@ -256,13 +256,6 @@ class StatCard extends StatelessWidget {
return BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
blurRadius: 8,
offset: const Offset(0, 2),
),
],
);
case StatCardStyle.outlined:
return BoxDecoration(