Revert "hide systembar when preview"

This reverts commit 0fb394cc36.
This commit is contained in:
dom
2026-04-23 11:07:31 +08:00
parent 354282930c
commit d6bce6aa63
6 changed files with 19 additions and 49 deletions

View File

@@ -1443,7 +1443,7 @@ class PlPlayerController with BlockConfigMixin {
try {
if (status) {
if (PlatformUtils.isMobile) {
hideSystemBar();
hideStatusBar();
if (orientation == null && mode == .none) {
return;
}
@@ -1476,7 +1476,7 @@ class PlPlayerController with BlockConfigMixin {
} else {
if (PlatformUtils.isMobile) {
if (!removeSafeArea) {
showSystemBar();
showStatusBar();
}
if (orientation == null && mode == .none) {
return;
@@ -1625,7 +1625,7 @@ class PlPlayerController with BlockConfigMixin {
_playerCount = 0;
if (removeSafeArea) {
showSystemBar();
showStatusBar();
}
danmakuController = null;
_stopOrientationListener();

View File

@@ -62,22 +62,21 @@ Future<void>? fullMode() {
);
}
bool _showSystemBar = true;
bool get showSystemBar_ => _showSystemBar;
Future<void>? hideSystemBar() {
if (!_showSystemBar) {
bool _showStatusBar = true;
Future<void>? hideStatusBar() {
if (!_showStatusBar) {
return null;
}
_showSystemBar = false;
_showStatusBar = false;
return SystemChrome.setEnabledSystemUIMode(.immersiveSticky);
}
//退出全屏显示
Future<void>? showSystemBar() {
if (_showSystemBar) {
Future<void>? showStatusBar() {
if (_showStatusBar) {
return null;
}
_showSystemBar = true;
_showStatusBar = true;
return SystemChrome.setEnabledSystemUIMode(
Platform.isAndroid && Utils.sdkInt < 29 ? .manual : .edgeToEdge,
overlays: SystemUiOverlay.values,