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

@@ -37,10 +37,21 @@ class _MediaPageState extends CommonPageState<MinePage, MineController>
@override
bool get wantKeepAlive => true;
bool get checkPage =>
_mainController.navigationBars[0] != NavigationBarType.mine &&
_mainController.selectedIndex.value == 0;
@override
bool onNotification(UserScrollNotification notification) {
if (checkPage) {
return false;
}
return super.onNotification(notification);
}
@override
void listener() {
if (_mainController.navigationBars[0] != NavigationBarType.mine &&
_mainController.selectedIndex.value == 0) {
if (checkPage) {
return;
}
super.listener();
@@ -51,34 +62,36 @@ class _MediaPageState extends CommonPageState<MinePage, MineController>
super.build(context);
final theme = Theme.of(context);
final secondary = theme.colorScheme.secondary;
return Column(
children: [
const SizedBox(height: 10),
_buildHeaderActions,
const SizedBox(height: 10),
Expanded(
child: Material(
type: MaterialType.transparency,
child: refreshIndicator(
onRefresh: controller.onRefresh,
child: ListView(
padding: const EdgeInsets.only(bottom: 100),
controller: controller.scrollController,
physics: const AlwaysScrollableScrollPhysics(),
children: [
_buildUserInfo(theme, secondary),
_buildActions(secondary),
Obx(
() => controller.loadingState.value is Loading
? const SizedBox.shrink()
: _buildFav(theme, secondary),
),
],
return onBuild(
Column(
children: [
const SizedBox(height: 10),
_buildHeaderActions,
const SizedBox(height: 10),
Expanded(
child: Material(
type: MaterialType.transparency,
child: refreshIndicator(
onRefresh: controller.onRefresh,
child: ListView(
padding: const EdgeInsets.only(bottom: 100),
controller: controller.scrollController,
physics: const AlwaysScrollableScrollPhysics(),
children: [
_buildUserInfo(theme, secondary),
_buildActions(secondary),
Obx(
() => controller.loadingState.value is Loading
? const SizedBox.shrink()
: _buildFav(theme, secondary),
),
],
),
),
),
),
),
],
],
),
);
}