mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: handle show viewpoints btn
Closes #457 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -44,7 +44,7 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget {
|
||||
size: 18,
|
||||
color: Colors.white,
|
||||
),
|
||||
fuc: onRefresh,
|
||||
onTap: onRefresh,
|
||||
),
|
||||
// // ComBtn(
|
||||
// icon: const Icon(
|
||||
@@ -192,7 +192,7 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget {
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
),
|
||||
fuc: () => plPlayerController.triggerFullScreen(
|
||||
onTap: () => plPlayerController.triggerFullScreen(
|
||||
status: !plPlayerController.isFullScreen.value),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -303,7 +303,9 @@ class PlPlayerController {
|
||||
wordSpacing: 0.1,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.normal,
|
||||
backgroundColor: Colors.black.withOpacity(subtitleBgOpaticy),
|
||||
backgroundColor: subtitleBgOpaticy == 0
|
||||
? null
|
||||
: Colors.black.withOpacity(subtitleBgOpaticy),
|
||||
);
|
||||
|
||||
SubtitleViewConfiguration get subtitleViewConfiguration =>
|
||||
|
||||
@@ -274,7 +274,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
size: 22,
|
||||
color: Colors.white,
|
||||
),
|
||||
fuc: () {
|
||||
onTap: () {
|
||||
bool? res;
|
||||
if (videoIntroController != null) {
|
||||
res = videoIntroController!.prevPlay();
|
||||
@@ -306,7 +306,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
size: 22,
|
||||
color: Colors.white,
|
||||
),
|
||||
fuc: () {
|
||||
onTap: () {
|
||||
bool? res;
|
||||
if (videoIntroController != null) {
|
||||
res = videoIntroController!.nextPlay();
|
||||
@@ -385,7 +385,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
),
|
||||
],
|
||||
),
|
||||
fuc: () {
|
||||
onTap: () {
|
||||
plPlayerController.showDmChart.value =
|
||||
!plPlayerController.showDmChart.value;
|
||||
},
|
||||
@@ -448,7 +448,11 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
fuc: widget.showViewPoints,
|
||||
onTap: widget.showViewPoints,
|
||||
onLongPress: () {
|
||||
plPlayerController.showVP.value =
|
||||
!plPlayerController.showVP.value;
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -465,7 +469,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
size: 22,
|
||||
color: Colors.white,
|
||||
),
|
||||
fuc: () {
|
||||
onTap: () {
|
||||
int? index;
|
||||
int currentCid = plPlayerController.cid;
|
||||
String bvid = plPlayerController.bvid;
|
||||
@@ -629,7 +633,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
size: 24,
|
||||
color: Colors.white,
|
||||
),
|
||||
fuc: () => plPlayerController.triggerFullScreen(
|
||||
onTap: () => plPlayerController.triggerFullScreen(
|
||||
status: !isFullScreen, duration: 800),
|
||||
),
|
||||
),
|
||||
@@ -1516,7 +1520,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
size: 15,
|
||||
color: Colors.white,
|
||||
),
|
||||
fuc: () => plPlayerController.onLockControl(
|
||||
onTap: () => plPlayerController.onLockControl(
|
||||
!plPlayerController.controlsLock.value),
|
||||
),
|
||||
),
|
||||
@@ -1546,7 +1550,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
),
|
||||
fuc: () {
|
||||
onTap: () {
|
||||
SmartDialog.showToast('截图中');
|
||||
plPlayerController.videoPlayerController
|
||||
?.screenshot(format: 'image/png')
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ComBtn extends StatelessWidget {
|
||||
final Widget? icon;
|
||||
final GestureTapCallback? fuc;
|
||||
final Widget icon;
|
||||
final VoidCallback? onTap;
|
||||
final VoidCallback? onLongPress;
|
||||
|
||||
const ComBtn({
|
||||
this.icon,
|
||||
this.fuc,
|
||||
required this.icon,
|
||||
this.onTap,
|
||||
this.onLongPress,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@@ -16,8 +18,9 @@ class ComBtn extends StatelessWidget {
|
||||
width: 34,
|
||||
height: 34,
|
||||
child: GestureDetector(
|
||||
onTap: fuc,
|
||||
child: icon!,
|
||||
onTap: onTap,
|
||||
onLongPress: onLongPress,
|
||||
child: icon,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user