chore: clean up

opt: pages

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-19 18:05:02 +08:00
parent e5f3c3c922
commit a2ef4e6f84
99 changed files with 697 additions and 2097 deletions

View File

@@ -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);
}

View File

@@ -147,7 +147,6 @@ class _FavPanelState extends State<FavPanel> {
);
}
} else {
// 骨架屏
return const Center(
child: CircularProgressIndicator(),
);

View File

@@ -152,7 +152,6 @@ class _GroupPanelState extends State<GroupPanel> {
);
}
} else {
// 骨架屏
return const Center(
child: CircularProgressIndicator(),
);

View File

@@ -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,
);
}

View File

@@ -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) {