Skip to content

Commit

Permalink
disabled transparency for 3 button navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
bmaroti9 committed May 26, 2024
1 parent 44e26f9 commit 283a2ab
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
19 changes: 12 additions & 7 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down Expand Up @@ -273,6 +266,18 @@ class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
List<Color> 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(
Expand Down
2 changes: 1 addition & 1 deletion lib/main_screens.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down

0 comments on commit 283a2ab

Please sign in to comment.