feat(design-system): dark mode adaptatif sur widgets partagés
Pattern AppColors pair (isDark ? AppColors.surfaceDark : AppColors.surface) appliqué sur : - UnionStatWidget, UnionBalanceCard, UnionActionButton, UFSectionHeader - DashboardEventRow, DashboardActivityRow, UnionExportButton - MiniAvatar (border adaptatif) - ConfirmationDialog (cancel colors adaptés) - FileUploadWidget (textSecondary adaptatif) Les couleurs surface/border/textPrimary/textSecondary hardcodées (light-only) sont remplacées par les paires *Dark conditionnelles. Les couleurs sémantiques (error, success, warning, primary) restent inchangées.
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../tokens/app_colors.dart';
|
||||
import '../tokens/unionflow_colors.dart';
|
||||
|
||||
/// Ligne d'événement à venir — style fintech avec bordure gauche verte
|
||||
/// Titre + date + countdown optionnel + participants optionnel
|
||||
/// Adaptatif dark/light via AppColors
|
||||
class DashboardEventRow extends StatelessWidget {
|
||||
final String title;
|
||||
final String date;
|
||||
@@ -19,11 +20,17 @@ class DashboardEventRow extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
final bgColor = isDark ? AppColors.surfaceDark : AppColors.surface;
|
||||
final textPrimary = isDark ? AppColors.textPrimaryDark : AppColors.textPrimary;
|
||||
final textSecondary= isDark ? AppColors.textSecondaryDark: AppColors.textSecondary;
|
||||
final textTertiary = isDark ? AppColors.textSecondaryDark: AppColors.textTertiary;
|
||||
|
||||
return Container(
|
||||
margin: const EdgeInsets.only(bottom: 6),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 9),
|
||||
decoration: BoxDecoration(
|
||||
color: UnionFlowColors.surface,
|
||||
color: bgColor,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: const Border(
|
||||
left: BorderSide(color: UnionFlowColors.unionGreen, width: 3),
|
||||
@@ -37,21 +44,14 @@ class DashboardEventRow extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: UnionFlowColors.textPrimary,
|
||||
),
|
||||
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: textPrimary),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
date,
|
||||
style: const TextStyle(
|
||||
fontSize: 10,
|
||||
color: UnionFlowColors.textSecondary,
|
||||
),
|
||||
style: TextStyle(fontSize: 10, color: textSecondary),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -73,10 +73,7 @@ class DashboardEventRow extends StatelessWidget {
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
participants!,
|
||||
style: const TextStyle(
|
||||
fontSize: 10,
|
||||
color: UnionFlowColors.textTertiary,
|
||||
),
|
||||
style: TextStyle(fontSize: 10, color: textTertiary),
|
||||
),
|
||||
],
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user