Correction fonctionnalité rear display

This commit is contained in:
2026-05-20 22:17:01 +02:00
parent d0045a7d61
commit 6515d8348d
2 changed files with 125 additions and 82 deletions
+7 -4
View File
@@ -93,10 +93,13 @@ class _HomeScreenState extends State<HomeScreen> {
final mediaQuery = MediaQuery.of(context);
final size = mediaQuery.size;
// Détection de l'écran arrière du Xiaomi 17 Pro Max (976x596)
// On vérifie les dimensions avec une petite marge de tolérance ou en mode paysage/portrait
final bool isXiaomiBackScreen = (size.width.toInt() == 976 && size.height.toInt() == 596) ||
(size.width.toInt() == 596 && size.height.toInt() == 976);
// Détection de l'écran arrière du Xiaomi 17 Pro Max
// On utilise les dimensions logiques observées (381x624)
final bool isXiaomiBackScreen =
// Mode Paysage (624x381)
((size.width >= 620 && size.width <= 630) && (size.height >= 375 && size.height <= 385)) ||
// Mode Portrait (381x624)
((size.width >= 375 && size.width <= 385) && (size.height >= 620 && size.height <= 630));
if (isXiaomiBackScreen) {
return const Scaffold(