remove boolext

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-30 22:19:32 +08:00
parent 3031d5e3b0
commit a260b1640a
55 changed files with 185 additions and 257 deletions

View File

@@ -994,7 +994,7 @@ class PlPlayerController {
} else if (event.startsWith('Could not open codec')) {
SmartDialog.showToast('无法加载解码器, $event,可能会切换至软解');
} else {
if (onlyPlayAudio.value.not) {
if (!onlyPlayAudio.value) {
if (event.startsWith("Failed to open .") ||
event.startsWith("Cannot open") ||
event.startsWith("Can not open")) {
@@ -1464,7 +1464,7 @@ class PlPlayerController {
if (!enableHeart || MineController.anonymity.value || progress == 0) {
return;
} else if (playerStatus.status.value == PlayerStatus.paused) {
if (isManual.not) {
if (!isManual) {
return;
}
}

View File

@@ -195,7 +195,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
FlutterVolumeController.addListener((double value) {
if (mounted && !_volumeInterceptEventStream.value) {
_volumeValue.value = value;
if (Platform.isIOS && FlutterVolumeController.showSystemUI.not) {
if (Platform.isIOS && !FlutterVolumeController.showSystemUI) {
_volumeIndicator.value = true;
_volumeTimer?.cancel();
_volumeTimer = Timer(const Duration(milliseconds: 800), () {
@@ -479,8 +479,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
color: Colors.white,
),
onTap: () {
if (anySeason.not ||
widget.videoDetailController?.isPlayAll == true) {
if (!anySeason || widget.videoDetailController?.isPlayAll == true) {
widget.showEpisodes?.call();
return;
}
@@ -776,8 +775,8 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
_gestureType = 'horizontal';
} else if (cumulativeDelta.dy.abs() >
3 * cumulativeDelta.dx.abs()) {
if (plPlayerController.enableSlideVolumeBrightness.not &&
plPlayerController.enableSlideFS.not) {
if (!plPlayerController.enableSlideVolumeBrightness &&
!plPlayerController.enableSlideFS) {
return;
}
@@ -787,19 +786,19 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
final double tapPosition = details.localFocalPoint.dx;
final double sectionWidth = totalWidth / 3;
if (tapPosition < sectionWidth) {
if (plPlayerController.enableSlideVolumeBrightness.not) {
if (!plPlayerController.enableSlideVolumeBrightness) {
return;
}
// 左边区域
_gestureType = 'left';
} else if (tapPosition < sectionWidth * 2) {
if (plPlayerController.enableSlideFS.not) {
if (!plPlayerController.enableSlideFS) {
return;
}
// 全屏
_gestureType = 'center';
} else {
if (plPlayerController.enableSlideVolumeBrightness.not) {
if (!plPlayerController.enableSlideVolumeBrightness) {
return;
}
// 右边区域
@@ -873,7 +872,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
plPlayerController
.durationSeconds.value.inMilliseconds *
renderBox.size.width;
if (plPlayerController.showPreview.value.not) {
if (!plPlayerController.showPreview.value) {
plPlayerController.showPreview.value = true;
}
} catch (_) {}
@@ -954,8 +953,8 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
},
onVerticalDragUpdate: (details) {
if (plPlayerController.controlsLock.value) return;
if (plPlayerController.enableSlideVolumeBrightness.not &&
plPlayerController.enableSlideFS.not) {
if (!plPlayerController.enableSlideVolumeBrightness &&
!plPlayerController.enableSlideFS) {
return;
}
RenderBox renderBox =
@@ -965,19 +964,19 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
final double sectionWidth = totalWidth / 3;
late String gestureType;
if (tapPosition < sectionWidth) {
if (plPlayerController.enableSlideVolumeBrightness.not) {
if (!plPlayerController.enableSlideVolumeBrightness) {
return;
}
// 左边区域
gestureType = 'left';
} else if (tapPosition < sectionWidth * 2) {
if (plPlayerController.enableSlideFS.not) {
if (!plPlayerController.enableSlideFS) {
return;
}
// 全屏
gestureType = 'center';
} else {
if (plPlayerController.enableSlideVolumeBrightness.not) {
if (!plPlayerController.enableSlideVolumeBrightness) {
return;
}
// 右边区域

View File

@@ -4,7 +4,6 @@ import 'package:PiliPlus/common/widgets/progress_bar/audio_video_progress_bar.da
import 'package:PiliPlus/common/widgets/progress_bar/segment_progress_bar.dart';
import 'package:PiliPlus/plugin/pl_player/controller.dart';
import 'package:PiliPlus/plugin/pl_player/view.dart';
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/feed_back.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
@@ -75,7 +74,7 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget {
double newProgress =
duration.timeStamp.inSeconds / max;
if (controller.showSeekPreview) {
if (controller.showPreview.value.not) {
if (!controller.showPreview.value) {
controller.showPreview.value = true;
}
controller.previewDx.value =