Skip to content

Commit

Permalink
Merge pull request #158 from PDG-NUTRI/111-bloquer-fait-pouvoir-pivot…
Browse files Browse the repository at this point in the history
…er-écran

Rotation bloqué
  • Loading branch information
chloefont authored Sep 4, 2022
2 parents 2f98a92 + 7890cc3 commit 0df85af
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/material.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/services.dart';
import 'package:get_it/get_it.dart';
import 'package:pdg_app/provider/auth_provider.dart';
import 'package:pdg_app/router/auth_gard.dart';
Expand All @@ -27,9 +28,15 @@ Future<void> setup() async {

void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
await Future.wait([
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]),
Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
),
]);
await setup();
runApp(MyApp());
}
Expand Down

0 comments on commit 0df85af

Please sign in to comment.