From 283a2ab5e7c2a0a327c39ac21257fd636a7dbb77 Mon Sep 17 00:00:00 2001 From: bmaroti9 Date: Sun, 26 May 2024 10:12:52 +0200 Subject: [PATCH] disabled transparency for 3 button navigation --- android/app/build.gradle | 4 ++-- lib/main.dart | 19 ++++++++++++------- lib/main_screens.dart | 2 +- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 80b2981..ad1164d 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -53,8 +53,8 @@ android { // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdkVersion flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion - versionCode 35 - versionName "2.3.8" + versionCode 36 + versionName "2.3.9" } buildTypes { diff --git a/lib/main.dart b/lib/main.dart index 702fc68..e08610f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -43,13 +43,6 @@ void main() { final data = WidgetsBinding.instance.platformDispatcher.views.first.physicalSize; final ratio = WidgetsBinding.instance.platformDispatcher.views.first.devicePixelRatio; - SystemChrome.setSystemUIOverlayStyle( - const SystemUiOverlayStyle( - systemNavigationBarColor: Colors.transparent, - ), - ); - SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge); - if (data.shortestSide / ratio < 600) { SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]) .then((value) => runApp(const MyApp())); @@ -273,6 +266,18 @@ class _MyAppState extends State { @override Widget build(BuildContext context) { List colors = getStartBackColor(); + + final EdgeInsets systemGestureInsets = MediaQuery.of(context).systemGestureInsets; + print(('hihi', systemGestureInsets.left)); + if (systemGestureInsets.left > 0) { + SystemChrome.setSystemUIOverlayStyle( + const SystemUiOverlayStyle( + systemNavigationBarColor: Colors.transparent, + ), + ); + SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge); + } + return MaterialApp( debugShowCheckedModeBanner: false, home: Scaffold( diff --git a/lib/main_screens.dart b/lib/main_screens.dart index ed5e513..5d15279 100644 --- a/lib/main_screens.dart +++ b/lib/main_screens.dart @@ -26,7 +26,7 @@ Widget NewMain(data, updateLocation, context) { headerData: HeaderData( //backgroundColor: WHITE, blurContent: false, - headerHeight: max(size.height * 0.58, 400), //we don't want it to be smaller than 400 + headerHeight: max(size.height * 0.57, 400), //we don't want it to be smaller than 400 header: ParrallaxBackground(imagePath1: data.current.backdrop, key: Key(data.place), color: data.current.backcolor == BLACK ? BLACK : lightAccent(data.current.backcolor, 5000)),