Correction fonctionnalité rear display
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user