mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
lint
opt pages Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -226,7 +226,7 @@ class VideoDetailController extends GetxController
|
||||
imageStatus = true;
|
||||
}
|
||||
|
||||
void onDismissed(value) {
|
||||
void onDismissed(int _) {
|
||||
imageStatus = false;
|
||||
}
|
||||
|
||||
@@ -813,7 +813,7 @@ class VideoDetailController extends GetxController
|
||||
}
|
||||
}
|
||||
|
||||
void onAddItem(item) {
|
||||
void onAddItem(dynamic item) {
|
||||
if (listData.contains(item)) return;
|
||||
listData.insert(0, item);
|
||||
listKey.currentState?.insertItem(0);
|
||||
@@ -841,7 +841,7 @@ class VideoDetailController extends GetxController
|
||||
});
|
||||
}
|
||||
|
||||
Widget buildItem(item, Animation<double> animation) {
|
||||
Widget buildItem(dynamic item, Animation<double> animation) {
|
||||
return Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: SlideTransition(
|
||||
@@ -1063,10 +1063,10 @@ class VideoDetailController extends GetxController
|
||||
}
|
||||
|
||||
Future<void> playerInit({
|
||||
video,
|
||||
audio,
|
||||
seekToTime,
|
||||
duration,
|
||||
String? video,
|
||||
String? audio,
|
||||
Duration? seekToTime,
|
||||
Duration? duration,
|
||||
bool? autoplay,
|
||||
}) async {
|
||||
await plPlayerController.setDataSource(
|
||||
@@ -1088,9 +1088,10 @@ class VideoDetailController extends GetxController
|
||||
showVP: showVP,
|
||||
dmTrend: dmTrend,
|
||||
seekTo: seekToTime ?? defaultST ?? playedTime,
|
||||
duration: duration ?? data.timeLength == null
|
||||
? null
|
||||
: Duration(milliseconds: data.timeLength!),
|
||||
duration: duration ??
|
||||
(data.timeLength == null
|
||||
? null
|
||||
: Duration(milliseconds: data.timeLength!)),
|
||||
// 宽>高 水平 否则 垂直
|
||||
direction: direction.value,
|
||||
bvid: bvid,
|
||||
@@ -1414,7 +1415,7 @@ class VideoDetailController extends GetxController
|
||||
int? graphVersion;
|
||||
EdgeInfoData? steinEdgeInfo;
|
||||
late final RxBool showSteinEdgeInfo = false.obs;
|
||||
Future<void> getSteinEdgeInfo([edgeId]) async {
|
||||
Future<void> getSteinEdgeInfo([int? edgeId]) async {
|
||||
steinEdgeInfo = null;
|
||||
try {
|
||||
var res = await Request().get(
|
||||
@@ -1517,7 +1518,7 @@ class VideoDetailController extends GetxController
|
||||
}
|
||||
}
|
||||
|
||||
void updateMediaListHistory(aid) {
|
||||
void updateMediaListHistory(int aid) {
|
||||
if (Get.arguments?['sortField'] != null) {
|
||||
VideoHttp.medialistHistory(
|
||||
desc: _mediaDesc ? 1 : 0,
|
||||
@@ -1561,7 +1562,7 @@ class VideoDetailController extends GetxController
|
||||
super.onClose();
|
||||
}
|
||||
|
||||
void onReset([isStein]) {
|
||||
void onReset([bool? isStein]) {
|
||||
playedTime = null;
|
||||
videoUrl = null;
|
||||
audioUrl = null;
|
||||
|
||||
@@ -204,7 +204,7 @@ class _PgcIntroPageState extends State<PgcIntroPage>
|
||||
spacing: 6,
|
||||
children: [
|
||||
StatWidget(
|
||||
type: StatType.view,
|
||||
type: StatType.play,
|
||||
value: item.stat!.views,
|
||||
),
|
||||
StatWidget(
|
||||
|
||||
@@ -110,7 +110,7 @@ class _IntroDetailState extends CommonCollapseSlidePageState<PgcIntroPanel> {
|
||||
spacing: 6,
|
||||
children: [
|
||||
StatWidget(
|
||||
type: StatType.view,
|
||||
type: StatType.play,
|
||||
value: widget.item.stat!.views,
|
||||
),
|
||||
StatWidget(
|
||||
|
||||
@@ -45,7 +45,7 @@ class VideoIntroPanel extends StatefulWidget {
|
||||
final String heroTag;
|
||||
final Function showAiBottomSheet;
|
||||
final Function showEpisodes;
|
||||
final ValueChanged onShowMemberPage;
|
||||
final ValueChanged<int?> onShowMemberPage;
|
||||
|
||||
@override
|
||||
State<VideoIntroPanel> createState() => _VideoIntroPanelState();
|
||||
@@ -97,7 +97,7 @@ class VideoInfo extends StatefulWidget {
|
||||
final String heroTag;
|
||||
final Function showAiBottomSheet;
|
||||
final Function showEpisodes;
|
||||
final ValueChanged onShowMemberPage;
|
||||
final ValueChanged<int?> onShowMemberPage;
|
||||
final VideoIntroController videoIntroController;
|
||||
|
||||
const VideoInfo({
|
||||
@@ -555,18 +555,18 @@ class _VideoInfoState extends State<VideoInfo> {
|
||||
spacing: 10,
|
||||
children: [
|
||||
StatWidget(
|
||||
type: StatType.view,
|
||||
type: StatType.play,
|
||||
value: !widget.isLoading
|
||||
? videoDetail.stat?.view
|
||||
: videoItem['stat']?.view,
|
||||
textColor: theme.colorScheme.outline,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
StatWidget(
|
||||
type: StatType.danmaku,
|
||||
value: !widget.isLoading
|
||||
? videoDetail.stat?.danmaku
|
||||
: videoItem['stat']?.danmu,
|
||||
textColor: theme.colorScheme.outline,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
Text(
|
||||
Utils.dateFormat(
|
||||
|
||||
@@ -229,7 +229,7 @@ class _HorizontalMemberPageState extends State<HorizontalMemberPage> {
|
||||
return Row(
|
||||
children: [
|
||||
const SizedBox(width: 16),
|
||||
_buildAvatar(memberInfoModel.face),
|
||||
_buildAvatar(memberInfoModel.face!),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(child: _buildInfo(theme, memberInfoModel)),
|
||||
const SizedBox(width: 16),
|
||||
@@ -388,7 +388,7 @@ class _HorizontalMemberPageState extends State<HorizontalMemberPage> {
|
||||
);
|
||||
}
|
||||
|
||||
Hero _buildAvatar(face) => Hero(
|
||||
Hero _buildAvatar(String face) => Hero(
|
||||
tag: face,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
|
||||
@@ -2055,7 +2055,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
);
|
||||
}
|
||||
|
||||
void showEpisodes([index, season, episodes, bvid, aid, cid]) {
|
||||
void showEpisodes([int? index, season, episodes, bvid, aid, cid]) {
|
||||
if (bvid == null) {
|
||||
videoDetailController.showMediaListPanel(context);
|
||||
return;
|
||||
@@ -2224,7 +2224,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
}
|
||||
}
|
||||
|
||||
void _onPopInvokedWithResult(didPop, result) {
|
||||
void _onPopInvokedWithResult(bool didPop, result) {
|
||||
if (plPlayerController?.controlsLock.value == true) {
|
||||
plPlayerController?.onLockControl(false);
|
||||
return;
|
||||
@@ -2238,7 +2238,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
}
|
||||
}
|
||||
|
||||
void onShowMemberPage(mid) {
|
||||
void onShowMemberPage(int? mid) {
|
||||
videoDetailController.childKey.currentState?.showBottomSheet(
|
||||
shape: const RoundedRectangleBorder(),
|
||||
(context) {
|
||||
|
||||
Reference in New Issue
Block a user