feat: audio page (#1518)

* feat: audio page

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* opt ui

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* impl intro, share, fav

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* tweaks

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* load prev/next

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
dom
2025-10-11 22:16:16 +08:00
committed by GitHub
parent a65edab7d1
commit 16f577f3fd
62 changed files with 49877 additions and 774 deletions

View File

@@ -59,76 +59,82 @@ class _HotPageState extends CommonPageState<HotPage, HotController>
@override
Widget build(BuildContext context) {
super.build(context);
return refreshIndicator(
onRefresh: controller.onRefresh,
child: CustomScrollView(
physics: const AlwaysScrollableScrollPhysics(),
controller: controller.scrollController,
slivers: [
SliverToBoxAdapter(
child: Obx(
() => controller.showHotRcmd.value
? Padding(
padding: const EdgeInsets.only(
left: 12,
top: 12,
right: 12,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
_buildEntranceItem(
iconUrl:
'http://i0.hdslb.com/bfs/archive/a3f11218aaf4521b4967db2ae164ecd3052586b9.png',
title: '排行榜',
onTap: () {
try {
HomeController homeController =
Get.find<HomeController>();
int index = homeController.tabs.indexOf(
HomeTabType.rank,
);
if (index != -1) {
homeController.tabController.animateTo(index);
} else {
Get.to(
Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('排行榜')),
body: const ViewSafeArea(
child: RankPage(),
),
),
return onBuild(
refreshIndicator(
onRefresh: controller.onRefresh,
child: CustomScrollView(
physics: const AlwaysScrollableScrollPhysics(),
controller: controller.scrollController,
slivers: [
SliverToBoxAdapter(
child: Obx(
() => controller.showHotRcmd.value
? Padding(
padding: const EdgeInsets.only(
left: 12,
top: 12,
right: 12,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
_buildEntranceItem(
iconUrl:
'http://i0.hdslb.com/bfs/archive/a3f11218aaf4521b4967db2ae164ecd3052586b9.png',
title: '排行榜',
onTap: () {
try {
HomeController homeController =
Get.find<HomeController>();
int index = homeController.tabs.indexOf(
HomeTabType.rank,
);
}
} catch (_) {}
},
),
_buildEntranceItem(
iconUrl:
'https://i0.hdslb.com/bfs/archive/552ebe8c4794aeef30ebd1568b59ad35f15e21ad.png',
title: '每周必看',
onTap: () => Get.toNamed('/popularSeries'),
),
_buildEntranceItem(
iconUrl:
'https://i0.hdslb.com/bfs/archive/3693ec9335b78ca57353ac0734f36a46f3d179a9.png',
title: '入站必刷',
onTap: () => Get.toNamed('/popularPrecious'),
),
],
),
)
: const SizedBox.shrink(),
if (index != -1) {
homeController.tabController.animateTo(
index,
);
} else {
Get.to(
Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
title: const Text('排行榜'),
),
body: const ViewSafeArea(
child: RankPage(),
),
),
);
}
} catch (_) {}
},
),
_buildEntranceItem(
iconUrl:
'https://i0.hdslb.com/bfs/archive/552ebe8c4794aeef30ebd1568b59ad35f15e21ad.png',
title: '每周必看',
onTap: () => Get.toNamed('/popularSeries'),
),
_buildEntranceItem(
iconUrl:
'https://i0.hdslb.com/bfs/archive/3693ec9335b78ca57353ac0734f36a46f3d179a9.png',
title: '入站必刷',
onTap: () => Get.toNamed('/popularPrecious'),
),
],
),
)
: const SizedBox.shrink(),
),
),
),
SliverPadding(
padding: const EdgeInsets.only(top: 7, bottom: 100),
sliver: Obx(
() => _buildBody(controller.loadingState.value),
SliverPadding(
padding: const EdgeInsets.only(top: 7, bottom: 100),
sliver: Obx(
() => _buildBody(controller.loadingState.value),
),
),
),
],
],
),
),
);
}