mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-03 16:49:48 +08:00
@@ -1474,7 +1474,7 @@ class PlPlayerController with BlockConfigMixin {
|
||||
try {
|
||||
if (status) {
|
||||
if (PlatformUtils.isMobile) {
|
||||
hideStatusBar();
|
||||
hideSystemBar();
|
||||
await changeOrientation(
|
||||
isVertical: isVertical,
|
||||
orientation: orientation,
|
||||
@@ -1485,7 +1485,7 @@ class PlPlayerController with BlockConfigMixin {
|
||||
} else {
|
||||
if (PlatformUtils.isMobile) {
|
||||
if (!removeSafeArea) {
|
||||
showStatusBar();
|
||||
showSystemBar();
|
||||
}
|
||||
if (orientation == null && mode == .none) {
|
||||
return;
|
||||
@@ -1632,7 +1632,7 @@ class PlPlayerController with BlockConfigMixin {
|
||||
|
||||
_playerCount = 0;
|
||||
if (removeSafeArea) {
|
||||
showStatusBar();
|
||||
showSystemBar();
|
||||
}
|
||||
danmakuController = null;
|
||||
_stopOrientationListener();
|
||||
|
||||
@@ -62,21 +62,22 @@ Future<void>? fullMode() {
|
||||
);
|
||||
}
|
||||
|
||||
bool _showStatusBar = true;
|
||||
Future<void>? hideStatusBar() {
|
||||
if (!_showStatusBar) {
|
||||
bool _showSystemBar = true;
|
||||
bool get showSystemBar_ => _showSystemBar;
|
||||
Future<void>? hideSystemBar() {
|
||||
if (!_showSystemBar) {
|
||||
return null;
|
||||
}
|
||||
_showStatusBar = false;
|
||||
_showSystemBar = false;
|
||||
return SystemChrome.setEnabledSystemUIMode(.immersiveSticky);
|
||||
}
|
||||
|
||||
//退出全屏显示
|
||||
Future<void>? showStatusBar() {
|
||||
if (_showStatusBar) {
|
||||
Future<void>? showSystemBar() {
|
||||
if (_showSystemBar) {
|
||||
return null;
|
||||
}
|
||||
_showStatusBar = true;
|
||||
_showSystemBar = true;
|
||||
return SystemChrome.setEnabledSystemUIMode(
|
||||
Platform.isAndroid && Utils.sdkInt < 29 ? .manual : .edgeToEdge,
|
||||
overlays: SystemUiOverlay.values,
|
||||
|
||||
Reference in New Issue
Block a user