更新日志

This commit is contained in:
guozhigq
2023-08-17 10:35:55 +08:00
parent ddceda1184
commit b800f1b83b
5 changed files with 25 additions and 10 deletions

View File

@ -1,16 +1,16 @@
import 'dart:io';
import 'package:device_info_plus/device_info_plus.dart';
// import 'package:auto_orientation/auto_orientation.dart';
import 'package:auto_orientation/auto_orientation.dart';
import 'package:flutter/services.dart';
//横屏
/// 低版本xcode不支持auto_orientation
// Future<void> landScape() async {
// if (Platform.isAndroid || Platform.isIOS) {
// await AutoOrientation.landscapeAutoMode(forceSensor: true);
// }
// }
Future<void> landScape() async {
if (Platform.isAndroid || Platform.isIOS) {
await AutoOrientation.landscapeAutoMode(forceSensor: true);
}
}
//竖屏
Future<void> verticalScreen() async {

View File

@ -166,7 +166,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
/// 进入全屏
await enterFullScreen();
// 横屏
// await landScape();
await landScape();
} else {
// 竖屏
await verticalScreen();
@ -177,14 +177,14 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
/// 进入全屏
await enterFullScreen();
// 横屏
// await landScape();
await landScape();
break;
case FullScreenMode.horizontal:
/// 进入全屏
await enterFullScreen();
// 横屏
// await landScape();
await landScape();
break;
}