更新日志
This commit is contained in:
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user