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

@@ -1,47 +1,162 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
/// UnionFlow Mobile App - Typographie Globale (Ultra Minimaliste)
/// RÈGLE : AUCUN gros titre. Tailles limitées entre 10px et 14px pour maximiser l'information.
/// UnionFlow Mobile App - Typographie Globale
/// Roboto (Google Fonts) — cohérence cross-platform
class AppTypography {
static const String _fontFamily = 'Roboto'; // Peut être changé pour 'Inter' si ajouté au pubspec.yaml
static const String _fontFamily = 'Roboto';
// --- Titres (Max 14px) ---
static const TextStyle headerSmall = TextStyle(
// --- Display / Titres principaux (Roboto via GoogleFonts) ---
static TextStyle get displayLarge => GoogleFonts.roboto(
fontSize: 32.0,
fontWeight: FontWeight.w700,
letterSpacing: -0.5,
height: 1.2,
);
static TextStyle get displayMedium => GoogleFonts.roboto(
fontSize: 28.0,
fontWeight: FontWeight.w700,
letterSpacing: -0.25,
height: 1.25,
);
static TextStyle get displaySmall => GoogleFonts.roboto(
fontSize: 24.0,
fontWeight: FontWeight.w600,
letterSpacing: 0,
height: 1.3,
);
// --- Titres de sections (Inter SemiBold) ---
static const TextStyle headerLarge = TextStyle(
fontFamily: _fontFamily,
fontSize: 14.0,
fontWeight: FontWeight.w700, // Bold
fontSize: 22.0,
fontWeight: FontWeight.w700,
letterSpacing: -0.2,
height: 1.27,
);
// --- Corps de texte (Max 12px) ---
/// Alias historique — conservé pour compatibilité
static const TextStyle headerSmall = TextStyle(
fontFamily: _fontFamily,
fontSize: 18.0,
fontWeight: FontWeight.w700,
letterSpacing: -0.2,
height: 1.3,
);
static const TextStyle titleMedium = TextStyle(
fontFamily: _fontFamily,
fontSize: 16.0,
fontWeight: FontWeight.w600,
letterSpacing: 0.1,
height: 1.5,
);
static const TextStyle titleSmall = TextStyle(
fontFamily: _fontFamily,
fontSize: 14.0,
fontWeight: FontWeight.w600,
letterSpacing: 0.1,
height: 1.43,
);
// --- Corps de texte ---
static const TextStyle bodyLarge = TextStyle(
fontFamily: _fontFamily,
fontSize: 16.0,
fontWeight: FontWeight.w400,
letterSpacing: 0.3,
height: 1.5,
);
static const TextStyle bodyMedium = TextStyle(
fontFamily: _fontFamily,
fontSize: 14.0,
fontWeight: FontWeight.w400,
letterSpacing: 0.25,
height: 1.43,
);
/// Alias historique — conservé pour compatibilité
static const TextStyle bodyTextSmall = TextStyle(
fontFamily: _fontFamily,
fontSize: 12.0,
fontWeight: FontWeight.w400, // Regular
fontSize: 13.0,
fontWeight: FontWeight.w400,
letterSpacing: 0.2,
height: 1.4,
);
// --- Boutons et Actions (Max 13px) ---
// --- Actions et boutons ---
static const TextStyle actionText = TextStyle(
fontFamily: _fontFamily,
fontSize: 13.0,
fontWeight: FontWeight.w600, // SemiBold
fontSize: 15.0,
fontWeight: FontWeight.w600,
letterSpacing: 0.1,
);
// --- Sous-titres, dates, labels (Max 11px) ---
static const TextStyle subtitleSmall = TextStyle(
static const TextStyle buttonLabel = TextStyle(
fontFamily: _fontFamily,
fontSize: 11.0,
fontWeight: FontWeight.w300, // Light
letterSpacing: 0.2,
fontSize: 16.0,
fontWeight: FontWeight.w700,
letterSpacing: 0.1,
);
// --- Badges, Piles, Métriques très denses (Max 10px) ---
// --- Sous-titres et labels ---
/// Alias historique — conservé pour compatibilité
static const TextStyle subtitleSmall = TextStyle(
fontFamily: _fontFamily,
fontSize: 12.0,
fontWeight: FontWeight.w400,
letterSpacing: 0.2,
height: 1.4,
);
static const TextStyle labelMedium = TextStyle(
fontFamily: _fontFamily,
fontSize: 12.0,
fontWeight: FontWeight.w500,
letterSpacing: 0.4,
height: 1.33,
);
// --- Badges, métriques denses ---
/// Alias historique — conservé pour compatibilité
static const TextStyle badgeText = TextStyle(
fontFamily: _fontFamily,
fontSize: 10.0,
fontWeight: FontWeight.w500, // Medium
fontSize: 11.0,
fontWeight: FontWeight.w500,
letterSpacing: 0.3,
);
static const TextStyle caption = TextStyle(
fontFamily: _fontFamily,
fontSize: 11.0,
fontWeight: FontWeight.w400,
letterSpacing: 0.4,
height: 1.45,
);
// --- Navigation ---
static const TextStyle navLabel = TextStyle(
fontFamily: _fontFamily,
fontSize: 11.0,
fontWeight: FontWeight.w500,
letterSpacing: 0.3,
);
static const TextStyle navLabelSelected = TextStyle(
fontFamily: _fontFamily,
fontSize: 11.0,
fontWeight: FontWeight.w700,
letterSpacing: 0.3,
);
}