diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 6a9e36c..14f322c 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -21,6 +21,7 @@ android:icon="@mipmap/ic_launcher"> UISupportedInterfaceOrientations UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight LSApplicationQueriesSchemes diff --git a/lib/main.dart b/lib/main.dart index 9f34097..22639b1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:travel_mate/blocs/balance/balance_bloc.dart'; @@ -47,6 +48,10 @@ import 'package:intl/date_symbol_data_local.dart'; /// initializes Firebase, and starts the application. void main() async { WidgetsFlutterBinding.ensureInitialized(); + await SystemChrome.setPreferredOrientations([ + DeviceOrientation.portraitUp, + DeviceOrientation.portraitDown, + ]); await dotenv.load(fileName: ".env"); await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); await initializeDateFormatting('fr_FR', null);