From ae06038ac64cb2e7b91d0324b63429c484bb45fe Mon Sep 17 00:00:00 2001 From: Valeri Gokadze Date: Wed, 18 Dec 2024 19:14:21 +0400 Subject: [PATCH] feat: let's get locked on portrait mode (#468) --- android/app/src/main/AndroidManifest.xml | 1 + lib/main.dart | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index a57003572..1120b07cb 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -45,6 +45,7 @@ android:taskAffinity="" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" + android:screenOrientation="portrait" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"> diff --git a/lib/main.dart b/lib/main.dart index 1a9019832..9bd4164b1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -134,6 +134,10 @@ class _MusifyState extends State { systemNavigationBarColor: Colors.transparent, ), ); + SystemChrome.setPreferredOrientations([ + DeviceOrientation.portraitUp, + DeviceOrientation.portraitDown, + ]); }); try {