Merge branch 'fix'
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_displaymode/flutter_displaymode.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
@ -67,9 +68,8 @@ void main() async {
|
||||
|
||||
// 小白条、导航栏沉浸
|
||||
if (Platform.isAndroid) {
|
||||
List<String> versionParts = Platform.version.split('.');
|
||||
int androidVersion = int.parse(versionParts[0]);
|
||||
if (androidVersion >= 29) {
|
||||
final androidInfo = await DeviceInfoPlugin().androidInfo;
|
||||
if (androidInfo.version.sdkInt >= 29) {
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||
}
|
||||
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
|
||||
|
||||
@ -978,41 +978,8 @@ class PlPlayerController {
|
||||
} else {
|
||||
await landScape();
|
||||
}
|
||||
|
||||
// bool isValid =
|
||||
// direction.value == 'vertical' || mode == FullScreenMode.vertical
|
||||
// ? true
|
||||
// : false;
|
||||
// var result = await showDialog(
|
||||
// context: Get.context!,
|
||||
// useSafeArea: false,
|
||||
// builder: (context) => Dialog.fullscreen(
|
||||
// backgroundColor: Colors.black,
|
||||
// child: SafeArea(
|
||||
// // 忽略手机安全区域
|
||||
// top: isValid,
|
||||
// left: false,
|
||||
// right: false,
|
||||
// bottom: isValid,
|
||||
// child: PLVideoPlayer(
|
||||
// controller: this,
|
||||
// headerControl: headerControl,
|
||||
// bottomControl: bottomControl,
|
||||
// danmuWidget: danmuWidget,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// if (result == null) {
|
||||
// // 退出全屏
|
||||
// StatusBarControl.setHidden(false, animation: StatusBarAnimation.FADE);
|
||||
// exitFullScreen();
|
||||
// await verticalScreen();
|
||||
// toggleFullScreen(false);
|
||||
// }
|
||||
} else if (isFullScreen.value) {
|
||||
} else if (isFullScreen.value && !status) {
|
||||
StatusBarControl.setHidden(false, animation: StatusBarAnimation.FADE);
|
||||
// Get.back();
|
||||
exitFullScreen();
|
||||
await verticalScreen();
|
||||
toggleFullScreen(false);
|
||||
|
||||
Reference in New Issue
Block a user