mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-22 11:41:09 +08:00
chore: clean up
opt: pages Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -150,11 +150,9 @@ class ActionItemState extends State<ActionItem>
|
||||
onTapDown: (details) => _isThumbsUp ? _startLongPress() : null,
|
||||
onTapUp: (details) => _isThumbsUp ? _cancelLongPress() : null,
|
||||
onTapCancel: () => _isThumbsUp ? _cancelLongPress(true) : null,
|
||||
// borderRadius: StyleString.mdRadius,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// const SizedBox(height: 2),
|
||||
Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
@@ -231,7 +229,6 @@ class _ArcPainter extends CustomPainter {
|
||||
);
|
||||
|
||||
const startAngle = -pi / 2;
|
||||
// const sweepAngle = -2 * pi;
|
||||
|
||||
canvas.drawArc(rect, startAngle, sweepAngle, false, paint);
|
||||
}
|
||||
|
||||
@@ -147,7 +147,6 @@ class _FavPanelState extends State<FavPanel> {
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// 骨架屏
|
||||
return const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
);
|
||||
|
||||
@@ -152,7 +152,6 @@ class _GroupPanelState extends State<GroupPanel> {
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// 骨架屏
|
||||
return const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
);
|
||||
|
||||
@@ -67,15 +67,14 @@ class _PagesPanelState extends State<PagesPanel> {
|
||||
if (!_scrollController.hasClients || pages.isEmpty) {
|
||||
return;
|
||||
}
|
||||
const double itemWidth = 150; // 每个列表项的宽度
|
||||
const double itemWidth = 150;
|
||||
final double targetOffset = (pageIndex * itemWidth - itemWidth / 2).clamp(
|
||||
_scrollController.position.minScrollExtent,
|
||||
_scrollController.position.maxScrollExtent);
|
||||
// 滑动至目标位置
|
||||
_scrollController.animateTo(
|
||||
targetOffset,
|
||||
duration: const Duration(milliseconds: 300), // 滑动动画持续时间
|
||||
curve: Curves.easeInOut, // 滑动动画曲线
|
||||
duration: const Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOut,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,9 +61,6 @@ class _SeasonPanelState extends State<SeasonPanel> {
|
||||
}
|
||||
|
||||
/// 取对应 season_id 的 episodes
|
||||
// episodes = widget.ugcSeason.sections!
|
||||
// .firstWhere((e) => e.seasonId == widget.ugcSeason.id)
|
||||
// .episodes;
|
||||
currentIndex.value = episodes.indexWhere(
|
||||
(EpisodeItem e) => e.cid == _videoDetailController.seasonCid);
|
||||
_listener = _videoDetailController.cid.listen((int cid) {
|
||||
@@ -86,17 +83,6 @@ class _SeasonPanelState extends State<SeasonPanel> {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
// void changeFucCall(item, int i) async {
|
||||
// await widget.changeFuc!(
|
||||
// IdUtils.av2bv(item.aid),
|
||||
// item.cid,
|
||||
// item.aid,
|
||||
// );
|
||||
// currentIndex = i;
|
||||
// Get.back();
|
||||
// setState(() {});
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (episodes.isEmpty) {
|
||||
|
||||
Reference in New Issue
Block a user