opt: code

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-11-28 16:16:40 +08:00
parent 1f71dc9a67
commit f4866258d2
41 changed files with 943 additions and 1223 deletions

View File

@@ -301,9 +301,7 @@ class PlPlayerController {
static Future<void> playIfExists(
{bool repeat = false, bool hideControls = true}) async {
// await _instance?.play(repeat: repeat, hideControls: hideControls);
if (_playCallBack != null) {
_playCallBack!();
}
_playCallBack?.call();
}
// try to get PlayerStatus

View File

@@ -371,18 +371,14 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
.episodes!;
// changeFucCall = bangumiIntroController!.changeSeasonOrbangu;
}
if (widget.showEpisodes != null) {
widget.showEpisodes!(
index,
isPage
? null
: videoIntroController?.videoDetail.value.ugcSeason,
episodes,
bvid,
IdUtils.bv2av(bvid),
currentCid,
);
}
widget.showEpisodes?.call(
index,
isPage ? null : videoIntroController?.videoDetail.value.ugcSeason,
episodes,
bvid,
IdUtils.bv2av(bvid),
currentCid,
);
},
),
),

View File

@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
class ComBtn extends StatelessWidget {
final Widget? icon;
final Function? fuc;
final GestureTapCallback? fuc;
const ComBtn({
this.icon,
@@ -16,9 +16,7 @@ class ComBtn extends StatelessWidget {
width: 34,
height: 34,
child: InkWell(
onTap: () {
fuc!();
},
onTap: fuc,
child: icon!,
),
);