feat: Début des évolutions interfaces mobiles v3.2.4
- Préparation de la nouvelle branche pour les évolutions - Mise à jour de la version vers 3.2.4 - Intégration des modifications en cours 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -101,31 +101,37 @@ class _GeosectorAppState extends State<GeosectorApp> with WidgetsBindingObserver
|
||||
debugShowCheckedModeBanner: false,
|
||||
// Builder pour appliquer le theme responsive à toute l'app
|
||||
builder: (context, child) {
|
||||
return MediaQuery(
|
||||
// Conserver les données MediaQuery existantes
|
||||
data: MediaQuery.of(context),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
// Récupérer le theme actuel (clair ou sombre)
|
||||
final brightness = Theme.of(context).brightness;
|
||||
final textColor = brightness == Brightness.light
|
||||
? AppTheme.textLightColor
|
||||
: AppTheme.textDarkColor;
|
||||
|
||||
// Débogage en mode développement
|
||||
final width = MediaQuery.of(context).size.width;
|
||||
final scaleFactor = AppTheme.getFontScaleFactor(width);
|
||||
debugPrint('📱 Largeur écran: ${width.toStringAsFixed(0)}px → Facteur: ×$scaleFactor');
|
||||
|
||||
// Appliquer le TextTheme responsive
|
||||
return Theme(
|
||||
data: Theme.of(context).copyWith(
|
||||
textTheme: AppTheme.getResponsiveTextTheme(context, textColor),
|
||||
),
|
||||
child: child ?? const SizedBox.shrink(),
|
||||
);
|
||||
},
|
||||
),
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
// Récupérer le theme actuel (clair ou sombre)
|
||||
final brightness = Theme.of(context).brightness;
|
||||
final textColor = brightness == Brightness.light
|
||||
? AppTheme.textLightColor
|
||||
: AppTheme.textDarkColor;
|
||||
|
||||
// Débogage en mode développement
|
||||
final width = constraints.maxWidth;
|
||||
final scaleFactor = AppTheme.getFontScaleFactor(width);
|
||||
|
||||
// Afficher le debug uniquement lors du changement de taille
|
||||
if (width < AppTheme.breakpointMobileSmall) {
|
||||
debugPrint('📱 Mode: Très petit mobile (${width.toStringAsFixed(0)}px) → Facteur: ×$scaleFactor');
|
||||
} else if (width < AppTheme.breakpointMobile) {
|
||||
debugPrint('📱 Mode: Mobile (${width.toStringAsFixed(0)}px) → Facteur: ×$scaleFactor');
|
||||
} else if (width < AppTheme.breakpointTablet) {
|
||||
debugPrint('📱 Mode: Tablette (${width.toStringAsFixed(0)}px) → Facteur: ×$scaleFactor');
|
||||
} else {
|
||||
debugPrint('🖥️ Mode: Desktop (${width.toStringAsFixed(0)}px) → Facteur: ×$scaleFactor');
|
||||
}
|
||||
|
||||
// Appliquer le TextTheme responsive
|
||||
return Theme(
|
||||
data: Theme.of(context).copyWith(
|
||||
textTheme: AppTheme.getResponsiveTextTheme(context, textColor),
|
||||
),
|
||||
child: child ?? const SizedBox.shrink(),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
// Configuration des localisations pour le français
|
||||
|
||||
Reference in New Issue
Block a user