mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-17 06:33:59 +08:00
@@ -13,7 +13,6 @@ import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/http/fav.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/http/video.dart';
|
||||
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||
import 'package:PiliPlus/models/common/episode_panel_type.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_info_model/episode.dart' as pgc;
|
||||
@@ -261,15 +260,15 @@ class _EpisodePanelState extends State<EpisodePanel>
|
||||
}
|
||||
return offset + 7;
|
||||
} else {
|
||||
return index * 100 + 7;
|
||||
return index * 112 + 7;
|
||||
}
|
||||
}
|
||||
|
||||
double _calcItemHeight(ugc.BaseEpisodeItem episode) {
|
||||
if (episode is ugc.EpisodeItem && episode.pages!.length > 1) {
|
||||
return 145; // 98 + 2 + 10 + 35
|
||||
return 157; // 110 + 2 + 10 + 35
|
||||
}
|
||||
return 100;
|
||||
return 112;
|
||||
}
|
||||
|
||||
Widget _buildBody(
|
||||
@@ -310,7 +309,7 @@ class _EpisodePanelState extends State<EpisodePanel>
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
episodeItem, // 98
|
||||
episodeItem, // 110
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
@@ -351,7 +350,7 @@ class _EpisodePanelState extends State<EpisodePanel>
|
||||
isCurrentIndex: isCurrItem,
|
||||
);
|
||||
},
|
||||
itemExtent: 100,
|
||||
itemExtent: 112,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -427,9 +426,9 @@ class _EpisodePanelState extends State<EpisodePanel>
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 2),
|
||||
child: SizedBox(
|
||||
height: 98,
|
||||
height: 110,
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
type: .transparency,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
if (episode.badge == "会员" &&
|
||||
@@ -461,7 +460,7 @@ class _EpisodePanelState extends State<EpisodePanel>
|
||||
onLongPress: onLongPress,
|
||||
onSecondaryTap: PlatformUtils.isMobile ? null : onLongPress,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
padding: const .symmetric(
|
||||
horizontal: Style.safeSpace,
|
||||
vertical: 5,
|
||||
),
|
||||
@@ -474,8 +473,8 @@ class _EpisodePanelState extends State<EpisodePanel>
|
||||
children: [
|
||||
NetworkImgLayer(
|
||||
src: cover,
|
||||
width: 140.8,
|
||||
height: 88,
|
||||
width: 160,
|
||||
height: 100,
|
||||
cacheWidth: cacheWidth,
|
||||
),
|
||||
if (duration != null && duration > 0)
|
||||
@@ -483,14 +482,14 @@ class _EpisodePanelState extends State<EpisodePanel>
|
||||
text: DurationUtils.formatDuration(duration),
|
||||
right: 6.0,
|
||||
bottom: 6.0,
|
||||
type: PBadgeType.gray,
|
||||
type: .gray,
|
||||
),
|
||||
if (isCharging == true)
|
||||
const PBadge(
|
||||
text: '充电专属',
|
||||
top: 6,
|
||||
right: 6,
|
||||
type: PBadgeType.error,
|
||||
type: .error,
|
||||
)
|
||||
else if (episode.badge != null)
|
||||
PBadge(
|
||||
@@ -498,9 +497,9 @@ class _EpisodePanelState extends State<EpisodePanel>
|
||||
top: 6,
|
||||
right: 6,
|
||||
type: switch (episode.badge) {
|
||||
'预告' => PBadgeType.gray,
|
||||
'限免' => PBadgeType.free,
|
||||
_ => PBadgeType.primary,
|
||||
'预告' => .gray,
|
||||
'限免' => .free,
|
||||
_ => .primary,
|
||||
},
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user