gitignore propre
This commit is contained in:
@@ -1,349 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
class AppTheme {
|
||||
// Couleurs principales UnionFlow
|
||||
static const Color primaryColor = Color(0xFF2196F3);
|
||||
static const Color primaryLight = Color(0xFF64B5F6);
|
||||
static const Color primaryDark = Color(0xFF1976D2);
|
||||
|
||||
static const Color secondaryColor = Color(0xFF4CAF50);
|
||||
static const Color secondaryLight = Color(0xFF81C784);
|
||||
static const Color secondaryDark = Color(0xFF388E3C);
|
||||
|
||||
static const Color accentColor = Color(0xFFFF9800);
|
||||
static const Color errorColor = Color(0xFFE53935);
|
||||
static const Color warningColor = Color(0xFFFFC107);
|
||||
static const Color successColor = Color(0xFF4CAF50);
|
||||
static const Color infoColor = Color(0xFF2196F3);
|
||||
|
||||
// Couleurs neutres
|
||||
static const Color backgroundLight = Color(0xFFFAFAFA);
|
||||
static const Color backgroundDark = Color(0xFF121212);
|
||||
static const Color surfaceLight = Color(0xFFFFFFFF);
|
||||
static const Color surfaceDark = Color(0xFF1E1E1E);
|
||||
|
||||
static const Color textPrimary = Color(0xFF212121);
|
||||
static const Color textSecondary = Color(0xFF757575);
|
||||
static const Color textHint = Color(0xFFBDBDBD);
|
||||
static const Color textWhite = Color(0xFFFFFFFF);
|
||||
|
||||
// Bordures et dividers
|
||||
static const Color borderColor = Color(0xFFE0E0E0);
|
||||
static const Color borderLight = Color(0xFFF5F5F5);
|
||||
static const Color dividerColor = Color(0xFFBDBDBD);
|
||||
|
||||
// Couleurs Material 3 supplémentaires pour les composants unifiés
|
||||
static const Color outline = Color(0xFFE0E0E0);
|
||||
static const Color surfaceVariant = Color(0xFFF5F5F5);
|
||||
static const Color onSurfaceVariant = Color(0xFF757575);
|
||||
|
||||
// Tokens de design unifiés
|
||||
static const double borderRadiusSmall = 8.0;
|
||||
static const double borderRadiusMedium = 12.0;
|
||||
static const double borderRadiusLarge = 16.0;
|
||||
static const double borderRadiusXLarge = 20.0;
|
||||
|
||||
static const double spacingXSmall = 4.0;
|
||||
static const double spacingSmall = 8.0;
|
||||
static const double spacingMedium = 16.0;
|
||||
static const double spacingLarge = 24.0;
|
||||
static const double spacingXLarge = 32.0;
|
||||
|
||||
static const double elevationSmall = 1.0;
|
||||
static const double elevationMedium = 2.0;
|
||||
static const double elevationLarge = 4.0;
|
||||
static const double elevationXLarge = 8.0;
|
||||
|
||||
// Styles de texte unifiés
|
||||
static const TextStyle headlineSmall = TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: textPrimary,
|
||||
);
|
||||
|
||||
static const TextStyle titleMedium = TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: textPrimary,
|
||||
);
|
||||
|
||||
static const TextStyle bodyMedium = TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: textPrimary,
|
||||
);
|
||||
|
||||
static const TextStyle bodySmall = TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: textSecondary,
|
||||
);
|
||||
|
||||
static const TextStyle titleSmall = TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: textPrimary,
|
||||
);
|
||||
|
||||
static const TextStyle bodyLarge = TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: textPrimary,
|
||||
);
|
||||
|
||||
// Thème clair
|
||||
static ThemeData get lightTheme {
|
||||
return ThemeData(
|
||||
useMaterial3: true,
|
||||
brightness: Brightness.light,
|
||||
primarySwatch: _createMaterialColor(primaryColor),
|
||||
colorScheme: const ColorScheme.light(
|
||||
primary: primaryColor,
|
||||
onPrimary: textWhite,
|
||||
secondary: secondaryColor,
|
||||
onSecondary: textWhite,
|
||||
error: errorColor,
|
||||
onError: textWhite,
|
||||
surface: surfaceLight,
|
||||
onSurface: textPrimary,
|
||||
),
|
||||
|
||||
// AppBar
|
||||
appBarTheme: const AppBarTheme(
|
||||
elevation: 0,
|
||||
backgroundColor: primaryColor,
|
||||
foregroundColor: textWhite,
|
||||
centerTitle: true,
|
||||
systemOverlayStyle: SystemUiOverlayStyle.light,
|
||||
titleTextStyle: TextStyle(
|
||||
color: textWhite,
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
|
||||
// Cards
|
||||
cardTheme: CardTheme(
|
||||
elevation: 2,
|
||||
shadowColor: Colors.black.withOpacity(0.1),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
color: surfaceLight,
|
||||
),
|
||||
|
||||
// Boutons
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: primaryColor,
|
||||
foregroundColor: textWhite,
|
||||
elevation: 2,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
textStyle: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
outlinedButtonTheme: OutlinedButtonThemeData(
|
||||
style: OutlinedButton.styleFrom(
|
||||
foregroundColor: primaryColor,
|
||||
side: const BorderSide(color: primaryColor, width: 2),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
textStyle: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: primaryColor,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
textStyle: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Champs de saisie
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
filled: true,
|
||||
fillColor: surfaceLight,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: const BorderSide(color: borderColor),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: const BorderSide(color: borderColor),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: const BorderSide(color: primaryColor, width: 2),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: const BorderSide(color: errorColor),
|
||||
),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
hintStyle: const TextStyle(color: textHint),
|
||||
),
|
||||
|
||||
// Navigation bottom
|
||||
bottomNavigationBarTheme: const BottomNavigationBarThemeData(
|
||||
backgroundColor: surfaceLight,
|
||||
selectedItemColor: primaryColor,
|
||||
unselectedItemColor: textSecondary,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
elevation: 8,
|
||||
),
|
||||
|
||||
// Chip
|
||||
chipTheme: ChipThemeData(
|
||||
backgroundColor: primaryLight.withOpacity(0.1),
|
||||
selectedColor: primaryColor,
|
||||
labelStyle: const TextStyle(color: textPrimary),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
),
|
||||
|
||||
// Divider
|
||||
dividerTheme: const DividerThemeData(
|
||||
color: dividerColor,
|
||||
thickness: 1,
|
||||
),
|
||||
|
||||
// Typography
|
||||
textTheme: _textTheme,
|
||||
);
|
||||
}
|
||||
|
||||
// Thème sombre (pour plus tard)
|
||||
static ThemeData get darkTheme {
|
||||
return lightTheme.copyWith(
|
||||
brightness: Brightness.dark,
|
||||
scaffoldBackgroundColor: backgroundDark,
|
||||
// TODO: Implémenter le thème sombre complet
|
||||
);
|
||||
}
|
||||
|
||||
// Création d'un MaterialColor à partir d'une Color
|
||||
static MaterialColor _createMaterialColor(Color color) {
|
||||
List strengths = <double>[.05];
|
||||
Map<int, Color> swatch = <int, Color>{};
|
||||
final int r = color.red, g = color.green, b = color.blue;
|
||||
|
||||
for (int i = 1; i < 10; i++) {
|
||||
strengths.add(0.1 * i);
|
||||
}
|
||||
for (var strength in strengths) {
|
||||
final double ds = 0.5 - strength;
|
||||
swatch[(strength * 1000).round()] = Color.fromRGBO(
|
||||
r + ((ds < 0 ? r : (255 - r)) * ds).round(),
|
||||
g + ((ds < 0 ? g : (255 - g)) * ds).round(),
|
||||
b + ((ds < 0 ? b : (255 - b)) * ds).round(),
|
||||
1,
|
||||
);
|
||||
}
|
||||
return MaterialColor(color.value, swatch);
|
||||
}
|
||||
|
||||
// Typographie
|
||||
static const TextTheme _textTheme = TextTheme(
|
||||
displayLarge: TextStyle(
|
||||
fontSize: 32,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: textPrimary,
|
||||
),
|
||||
displayMedium: TextStyle(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: textPrimary,
|
||||
),
|
||||
displaySmall: TextStyle(
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: textPrimary,
|
||||
),
|
||||
headlineLarge: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: textPrimary,
|
||||
),
|
||||
headlineMedium: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: textPrimary,
|
||||
),
|
||||
headlineSmall: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: textPrimary,
|
||||
),
|
||||
titleLarge: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: textPrimary,
|
||||
),
|
||||
titleMedium: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: textPrimary,
|
||||
),
|
||||
titleSmall: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: textPrimary,
|
||||
),
|
||||
bodyLarge: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: textPrimary,
|
||||
),
|
||||
bodyMedium: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: textPrimary,
|
||||
),
|
||||
bodySmall: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: textSecondary,
|
||||
),
|
||||
labelLarge: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: textPrimary,
|
||||
),
|
||||
labelMedium: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: textSecondary,
|
||||
),
|
||||
labelSmall: TextStyle(
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: textHint,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// Extensions pour faciliter l'utilisation
|
||||
extension ThemeExtension on BuildContext {
|
||||
ThemeData get theme => Theme.of(this);
|
||||
ColorScheme get colors => Theme.of(this).colorScheme;
|
||||
TextTheme get textTheme => Theme.of(this).textTheme;
|
||||
}
|
||||
@@ -1,263 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'app_theme.dart';
|
||||
|
||||
/// Design System UnionFlow basé sur le nombre d'or et Material Design 3
|
||||
class DesignSystem {
|
||||
// === NOMBRE D'OR ET PROPORTIONS ===
|
||||
static const double goldenRatio = 1.618;
|
||||
static const double inverseGoldenRatio = 0.618;
|
||||
|
||||
// === ESPACEMENTS BASÉS SUR LE NOMBRE D'OR ===
|
||||
static const double baseUnit = 8.0;
|
||||
|
||||
// Espacements principaux (progression géométrique basée sur le nombre d'or)
|
||||
static const double spacing2xs = baseUnit * 0.5; // 4px
|
||||
static const double spacingXs = baseUnit; // 8px
|
||||
static const double spacingSm = baseUnit * 1.5; // 12px
|
||||
static const double spacingMd = baseUnit * 2; // 16px
|
||||
static const double spacingLg = baseUnit * 3; // 24px
|
||||
static const double spacingXl = baseUnit * 4; // 32px
|
||||
static const double spacing2xl = baseUnit * 6; // 48px
|
||||
static const double spacing3xl = baseUnit * 8; // 64px
|
||||
|
||||
// Espacements spéciaux basés sur le nombre d'or
|
||||
static const double spacingGolden = spacingMd * goldenRatio; // ~26px
|
||||
static const double spacingGoldenLarge = spacingLg * goldenRatio; // ~39px
|
||||
|
||||
// === RAYONS DE BORDURE ===
|
||||
static const double radiusXs = 4.0;
|
||||
static const double radiusSm = 8.0;
|
||||
static const double radiusMd = 12.0;
|
||||
static const double radiusLg = 16.0;
|
||||
static const double radiusXl = 20.0;
|
||||
static const double radius2xl = 24.0;
|
||||
|
||||
// === ÉLÉVATIONS ET OMBRES ===
|
||||
static const double elevationCard = 2.0;
|
||||
static const double elevationModal = 8.0;
|
||||
static const double elevationAppBar = 0.0;
|
||||
|
||||
// Ombres personnalisées
|
||||
static List<BoxShadow> get shadowCard => [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.04),
|
||||
blurRadius: 8,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.02),
|
||||
blurRadius: 16,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
];
|
||||
|
||||
static List<BoxShadow> get shadowCardHover => [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.08),
|
||||
blurRadius: 16,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.04),
|
||||
blurRadius: 32,
|
||||
offset: const Offset(0, 8),
|
||||
),
|
||||
];
|
||||
|
||||
static List<BoxShadow> get shadowModal => [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.12),
|
||||
blurRadius: 24,
|
||||
offset: const Offset(0, 8),
|
||||
),
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.08),
|
||||
blurRadius: 48,
|
||||
offset: const Offset(0, 16),
|
||||
),
|
||||
];
|
||||
|
||||
// === TYPOGRAPHIE AVANCÉE ===
|
||||
static const TextStyle displayLarge = TextStyle(
|
||||
fontSize: 40,
|
||||
fontWeight: FontWeight.w800,
|
||||
letterSpacing: -0.5,
|
||||
height: 1.2,
|
||||
color: AppTheme.textPrimary,
|
||||
);
|
||||
|
||||
static const TextStyle displayMedium = TextStyle(
|
||||
fontSize: 32,
|
||||
fontWeight: FontWeight.w700,
|
||||
letterSpacing: -0.25,
|
||||
height: 1.25,
|
||||
color: AppTheme.textPrimary,
|
||||
);
|
||||
|
||||
static const TextStyle headlineLarge = TextStyle(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: 0,
|
||||
height: 1.3,
|
||||
color: AppTheme.textPrimary,
|
||||
);
|
||||
|
||||
static const TextStyle headlineMedium = TextStyle(
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: 0,
|
||||
height: 1.33,
|
||||
color: AppTheme.textPrimary,
|
||||
);
|
||||
|
||||
static const TextStyle titleLarge = TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: 0,
|
||||
height: 1.4,
|
||||
color: AppTheme.textPrimary,
|
||||
);
|
||||
|
||||
static const TextStyle titleMedium = TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
letterSpacing: 0.1,
|
||||
height: 1.5,
|
||||
color: AppTheme.textPrimary,
|
||||
);
|
||||
|
||||
static const TextStyle bodyLarge = TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
letterSpacing: 0.15,
|
||||
height: 1.5,
|
||||
color: AppTheme.textPrimary,
|
||||
);
|
||||
|
||||
static const TextStyle bodyMedium = TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
letterSpacing: 0.25,
|
||||
height: 1.43,
|
||||
color: AppTheme.textPrimary,
|
||||
);
|
||||
|
||||
static const TextStyle labelLarge = TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
letterSpacing: 0.1,
|
||||
height: 1.43,
|
||||
color: AppTheme.textPrimary,
|
||||
);
|
||||
|
||||
static const TextStyle labelMedium = TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w500,
|
||||
letterSpacing: 0.5,
|
||||
height: 1.33,
|
||||
color: AppTheme.textSecondary,
|
||||
);
|
||||
|
||||
static const TextStyle labelSmall = TextStyle(
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.w500,
|
||||
letterSpacing: 0.5,
|
||||
height: 1.2,
|
||||
color: AppTheme.textHint,
|
||||
);
|
||||
|
||||
// === COULEURS ÉTENDUES ===
|
||||
// Palette de couleurs pour les graphiques (harmonieuse et accessible)
|
||||
static const List<Color> chartColors = [
|
||||
Color(0xFF2196F3), // Bleu principal
|
||||
Color(0xFF4CAF50), // Vert
|
||||
Color(0xFFFF9800), // Orange
|
||||
Color(0xFF9C27B0), // Violet
|
||||
Color(0xFFF44336), // Rouge
|
||||
Color(0xFF00BCD4), // Cyan
|
||||
Color(0xFFFFEB3B), // Jaune
|
||||
Color(0xFF795548), // Marron
|
||||
Color(0xFF607D8B), // Bleu gris
|
||||
Color(0xFFE91E63), // Rose
|
||||
];
|
||||
|
||||
// Couleurs de gradient
|
||||
static const LinearGradient primaryGradient = LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
AppTheme.primaryColor,
|
||||
AppTheme.primaryLight,
|
||||
],
|
||||
);
|
||||
|
||||
static const LinearGradient successGradient = LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
AppTheme.successColor,
|
||||
AppTheme.secondaryLight,
|
||||
],
|
||||
);
|
||||
|
||||
static const LinearGradient warningGradient = LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
AppTheme.warningColor,
|
||||
Color(0xFFFFB74D),
|
||||
],
|
||||
);
|
||||
|
||||
static const LinearGradient errorGradient = LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
AppTheme.errorColor,
|
||||
Color(0xFFEF5350),
|
||||
],
|
||||
);
|
||||
|
||||
// === ANIMATIONS ET TRANSITIONS ===
|
||||
static const Duration animationFast = Duration(milliseconds: 150);
|
||||
static const Duration animationMedium = Duration(milliseconds: 300);
|
||||
static const Duration animationSlow = Duration(milliseconds: 500);
|
||||
|
||||
static const Curve animationCurve = Curves.easeInOutCubic;
|
||||
static const Curve animationCurveEnter = Curves.easeOut;
|
||||
static const Curve animationCurveExit = Curves.easeIn;
|
||||
|
||||
// === BREAKPOINTS RESPONSIVE ===
|
||||
static const double breakpointMobile = 480;
|
||||
static const double breakpointTablet = 768;
|
||||
static const double breakpointDesktop = 1024;
|
||||
|
||||
// === UTILITAIRES ===
|
||||
static bool isMobile(BuildContext context) {
|
||||
return MediaQuery.of(context).size.width < breakpointMobile;
|
||||
}
|
||||
|
||||
static bool isTablet(BuildContext context) {
|
||||
final width = MediaQuery.of(context).size.width;
|
||||
return width >= breakpointMobile && width < breakpointDesktop;
|
||||
}
|
||||
|
||||
static bool isDesktop(BuildContext context) {
|
||||
return MediaQuery.of(context).size.width >= breakpointDesktop;
|
||||
}
|
||||
|
||||
// Calcul de dimensions basées sur le nombre d'or
|
||||
static double goldenWidth(double height) => height * goldenRatio;
|
||||
static double goldenHeight(double width) => width * inverseGoldenRatio;
|
||||
|
||||
// Espacement adaptatif basé sur la taille d'écran
|
||||
static double adaptiveSpacing(BuildContext context, {
|
||||
double mobile = spacingMd,
|
||||
double tablet = spacingLg,
|
||||
double desktop = spacingXl,
|
||||
}) {
|
||||
if (isMobile(context)) return mobile;
|
||||
if (isTablet(context)) return tablet;
|
||||
return desktop;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user