mod: 未开启横屏时不转屏

This commit is contained in:
orz12
2024-02-14 00:23:20 +08:00
parent 9afa4758d3
commit fc834a7040
4 changed files with 79 additions and 46 deletions

View File

@@ -42,6 +42,16 @@ Future<void> verticalScreen() async {
]);
}
//全向
Future<void> autoScreen() async {
await SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
]);
}
Future<void> enterFullScreen() async {
await SystemChrome.setEnabledSystemUIMode(
SystemUiMode.immersiveSticky,