Skip to content

Commit 3116c79

Browse files
authored
fix: lock app in portrait mode (#1823)
1 parent 0e48228 commit 3116c79

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/main.dart

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:flutter/material.dart';
2+
import 'package:flutter/services.dart';
23

34
import 'package:collection/collection.dart';
45
import 'package:flutter_dotenv/flutter_dotenv.dart';
@@ -114,6 +115,9 @@ Future<void> startGui(List<Client> clients, SharedPreferences store) async {
114115
await firstClient.logout();
115116
}
116117
}
118+
await SystemChrome.setPreferredOrientations([
119+
DeviceOrientation.portraitUp, // Lock to portrait mode
120+
]);
117121
// Pangea#
118122
runApp(FluffyChatApp(clients: clients, pincode: pin, store: store));
119123
}

0 commit comments

Comments
 (0)