Merge branch 'fix'
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:device_info_plus/device_info_plus.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_displaymode/flutter_displaymode.dart';
|
import 'package:flutter_displaymode/flutter_displaymode.dart';
|
||||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
@ -67,9 +68,8 @@ void main() async {
|
|||||||
|
|
||||||
// 小白条、导航栏沉浸
|
// 小白条、导航栏沉浸
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
List<String> versionParts = Platform.version.split('.');
|
final androidInfo = await DeviceInfoPlugin().androidInfo;
|
||||||
int androidVersion = int.parse(versionParts[0]);
|
if (androidInfo.version.sdkInt >= 29) {
|
||||||
if (androidVersion >= 29) {
|
|
||||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||||
}
|
}
|
||||||
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
|
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
|
||||||
|
|||||||
@ -978,41 +978,8 @@ class PlPlayerController {
|
|||||||
} else {
|
} else {
|
||||||
await landScape();
|
await landScape();
|
||||||
}
|
}
|
||||||
|
} else if (isFullScreen.value && !status) {
|
||||||
// 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) {
|
|
||||||
StatusBarControl.setHidden(false, animation: StatusBarAnimation.FADE);
|
StatusBarControl.setHidden(false, animation: StatusBarAnimation.FADE);
|
||||||
// Get.back();
|
|
||||||
exitFullScreen();
|
exitFullScreen();
|
||||||
await verticalScreen();
|
await verticalScreen();
|
||||||
toggleFullScreen(false);
|
toggleFullScreen(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user