mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: 新增播放页重力感应屏蔽设置
This commit is contained in:
@@ -5,6 +5,8 @@ import 'package:auto_orientation/auto_orientation.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import '../../../utils/storage.dart';
|
||||
|
||||
//横屏
|
||||
Future<void> landScape() async {
|
||||
dynamic document;
|
||||
@@ -44,6 +46,10 @@ Future<void> verticalScreen() async {
|
||||
|
||||
//全向
|
||||
Future<void> autoScreen() async {
|
||||
if (!GStrorage.setting
|
||||
.get(SettingBoxKey.allowRotateScreen, defaultValue: true)) {
|
||||
return;
|
||||
}
|
||||
await SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.portraitUp,
|
||||
DeviceOrientation.portraitDown,
|
||||
|
||||
Reference in New Issue
Block a user