* opt: cache

* opt: MediaListPanel

* feat: nested replyreply panel

* tweaks

* opt: abstract class

* opt: PageStorageKey

* opt: contextExt

* opt: EpisodePanel

* opt

* opt: context instead GlobalKey

* feat: jump to reply

* refa: reply_reply

* fix: jump

* fix: index

* update

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* opt: keepalive

* reapply: nested replyreply

* mod: spacing

* opt: CommonSlidePageState

* fix drag bottomsheet

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* opt reply jump

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* opt reply2reply

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* tweaks

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* tweaks

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* reapply: jumpToReply

* fix: padding

* fix: anim

* fix some panels

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* opt: implements Scaffold

* opt: remove keepalive

* revert: GlobalKey

* tweaks

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
My-Responsitories
2025-09-15 18:45:28 +08:00
committed by GitHub
parent b9a55ccbce
commit 37fb63c3b1
75 changed files with 6300 additions and 1140 deletions

View File

@@ -192,8 +192,12 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
super.initState();
_controlsListener = plPlayerController.showControls.listen((bool val) {
final visible = val && !plPlayerController.controlsLock.value;
widget.videoDetailController?.headerCtrKey.currentState?.provider.muted =
!visible;
if (widget.videoDetailController?.headerCtrKey.currentState?.provider
case final provider?) {
provider
..startIfNeeded()
..muted = !visible;
}
if (visible) {
animationController.forward();
} else {
@@ -1133,19 +1137,11 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
switch (key) {
case LogicalKeyboardKey.space:
onDoubleTapCenter();
break;
return;
case LogicalKeyboardKey.keyF:
plPlayerController.triggerFullScreen(status: !isFullScreen);
break;
case LogicalKeyboardKey.arrowLeft when (!plPlayerController.isLive):
onDoubleTapSeekBackward();
break;
case LogicalKeyboardKey.arrowRight when (!plPlayerController.isLive):
onDoubleTapSeekForward();
break;
return;
case LogicalKeyboardKey.escape:
if (isFullScreen) {
@@ -1153,7 +1149,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
} else {
Get.back();
}
break;
return;
case LogicalKeyboardKey.keyD:
final newVal = !plPlayerController.enableShowDanmaku.value;
@@ -1161,7 +1157,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
if (!plPlayerController.tempPlayerConf) {
GStorage.setting.put(SettingBoxKey.enableShowDanmaku, newVal);
}
break;
return;
case LogicalKeyboardKey.arrowUp:
final volume = math.min(
@@ -1169,7 +1165,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
plPlayerController.volume.value + 0.1,
);
setVolume(volume);
break;
return;
case LogicalKeyboardKey.arrowDown:
final volume = math.max(
@@ -1177,7 +1173,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
plPlayerController.volume.value - 0.1,
);
setVolume(volume);
break;
return;
case LogicalKeyboardKey.keyM:
final isMuted = !plPlayerController.isMuted;
@@ -1186,45 +1182,57 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
);
plPlayerController.isMuted = isMuted;
SmartDialog.showToast('${isMuted ? '' : '取消'}静音');
break;
return;
}
case LogicalKeyboardKey.keyQ when (!plPlayerController.isLive):
introController.actionLikeVideo();
break;
if (!plPlayerController.isLive) {
switch (key) {
case LogicalKeyboardKey.arrowLeft:
onDoubleTapSeekBackward();
return;
case LogicalKeyboardKey.keyW when (!plPlayerController.isLive):
introController.actionCoinVideo();
break;
case LogicalKeyboardKey.arrowRight:
onDoubleTapSeekForward();
return;
case LogicalKeyboardKey.keyE when (!plPlayerController.isLive):
introController.actionFavVideo(isQuick: true);
break;
case LogicalKeyboardKey.keyQ:
introController.actionLikeVideo();
return;
case LogicalKeyboardKey.keyR when (!plPlayerController.isLive):
introController.viewLater();
break;
case LogicalKeyboardKey.keyW:
introController.actionCoinVideo();
return;
case LogicalKeyboardKey.keyG when (!plPlayerController.isLive):
if (introController case UgcIntroController ugcCtr) {
ugcCtr.actionRelationMod(context);
}
break;
case LogicalKeyboardKey.keyE:
introController.actionFavVideo(isQuick: true);
return;
case LogicalKeyboardKey.bracketLeft when (!plPlayerController.isLive):
if (!introController.prevPlay()) {
SmartDialog.showToast('已经是第一集了');
}
break;
case LogicalKeyboardKey.keyR:
introController.viewLater();
return;
case LogicalKeyboardKey.bracketRight when (!plPlayerController.isLive):
if (!introController.nextPlay()) {
SmartDialog.showToast('已经是最后一集了');
}
break;
case LogicalKeyboardKey.keyG:
if (introController case UgcIntroController ugcCtr) {
ugcCtr.actionRelationMod(context);
}
return;
case LogicalKeyboardKey.enter when (!plPlayerController.isLive):
widget.videoDetailController?.showShootDanmakuSheet();
break;
case LogicalKeyboardKey.bracketLeft:
if (!introController.prevPlay()) {
SmartDialog.showToast('已经是第一集了');
}
return;
case LogicalKeyboardKey.bracketRight:
if (!introController.nextPlay()) {
SmartDialog.showToast('已经是最后一集了');
}
return;
case LogicalKeyboardKey.enter:
widget.videoDetailController?.showShootDanmakuSheet();
return;
}
}
}
}
@@ -2277,13 +2285,13 @@ class VideoShotImage extends StatefulWidget {
Future<ui.Image?> _getImg(String url) async {
final cacheManager = DefaultCacheManager();
final cacheKey = url.hashCode.toString();
final cacheKey = Utils.getFileName(url, fileExt: false);
final fileInfo = await cacheManager.getFileFromCache(cacheKey);
if (fileInfo != null) {
final bytes = await fileInfo.file.readAsBytes();
return _loadImg(bytes);
} else {
final res = await Request().get(
final res = await Request().get<Uint8List>(
url,
options: Options(responseType: ResponseType.bytes),
);