opt: pages

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-28 21:54:53 +08:00
parent 139b48c457
commit 312ce6e639
4 changed files with 79 additions and 78 deletions

View File

@@ -406,6 +406,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
flex: _ratio[1].toInt(), flex: _ratio[1].toInt(),
child: Scaffold( child: Scaffold(
key: _key, key: _key,
backgroundColor: Colors.transparent,
body: refreshIndicator( body: refreshIndicator(
onRefresh: () async { onRefresh: () async {
await _dynamicDetailController.onRefresh(); await _dynamicDetailController.onRefresh();

View File

@@ -399,6 +399,7 @@ class _HtmlRenderPageState extends State<HtmlRenderPage>
flex: _ratio[1].toInt(), flex: _ratio[1].toInt(),
child: Scaffold( child: Scaffold(
key: _key, key: _key,
backgroundColor: Colors.transparent,
body: CustomScrollView( body: CustomScrollView(
controller: _htmlRenderCtr.scrollController, controller: _htmlRenderCtr.scrollController,
slivers: [ slivers: [

View File

@@ -618,6 +618,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
child: Scaffold( child: Scaffold(
key: videoDetailController.childKey, key: videoDetailController.childKey,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column( body: Column(
children: [ children: [
buildTabbar( buildTabbar(
@@ -670,6 +671,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
child: Scaffold( child: Scaffold(
key: videoDetailController.childKey, key: videoDetailController.childKey,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column( body: Column(
children: [ children: [
buildTabbar(showReply: videoDetailController.showReply), buildTabbar(showReply: videoDetailController.showReply),
@@ -714,6 +716,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
child: Scaffold( child: Scaffold(
key: videoDetailController.childKey, key: videoDetailController.childKey,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column( body: Column(
children: [ children: [
buildTabbar( buildTabbar(
@@ -766,6 +769,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
child: Scaffold( child: Scaffold(
key: videoDetailController.childKey, key: videoDetailController.childKey,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column( body: Column(
children: [ children: [
buildTabbar( buildTabbar(
@@ -872,6 +876,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
child: Scaffold( child: Scaffold(
key: videoDetailController.childKey, key: videoDetailController.childKey,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column( body: Column(
children: [ children: [
buildTabbar( buildTabbar(
@@ -888,16 +893,13 @@ class _VideoDetailPageState extends State<VideoDetailPage>
if (videoDetailController.videoType == if (videoDetailController.videoType ==
SearchType.video && SearchType.video &&
videoDetailController.showRelatedVideo) videoDetailController.showRelatedVideo)
Material( CustomScrollView(
color: Colors.transparent, controller: _introController,
child: CustomScrollView( slivers: [
controller: _introController, RelatedVideoPanel(
slivers: [ key: relatedVideoPanelKey,
RelatedVideoPanel( heroTag: heroTag),
key: relatedVideoPanelKey, ],
heroTag: heroTag),
],
),
), ),
if (videoDetailController.showReply) if (videoDetailController.showReply)
videoReplyPanel, videoReplyPanel,
@@ -1505,67 +1507,62 @@ class _VideoDetailPageState extends State<VideoDetailPage>
); );
Widget videoIntro([bool needRelated = true]) { Widget videoIntro([bool needRelated = true]) {
Widget introPanel() => Material( Widget introPanel() => CustomScrollView(
color: Colors.transparent, key: const PageStorageKey<String>('简介'),
child: CustomScrollView( controller: needRelated ? _introController : null,
key: const PageStorageKey<String>('简介'), slivers: [
controller: needRelated ? _introController : null, if (videoDetailController.videoType == SearchType.video) ...[
slivers: [ VideoIntroPanel(
if (videoDetailController.videoType == SearchType.video) ...[ heroTag: heroTag,
VideoIntroPanel( showAiBottomSheet: showAiBottomSheet,
showIntroDetail: showIntroDetail,
showEpisodes: showEpisodes,
onShowMemberPage: onShowMemberPage,
),
if (needRelated && videoDetailController.showRelatedVideo) ...[
SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.only(top: StyleString.safeSpace),
child: Divider(
height: 1,
indent: 12,
endIndent: 12,
color: Theme.of(context)
.colorScheme
.outline
.withOpacity(0.08),
),
),
),
RelatedVideoPanel(key: relatedVideoPanelKey, heroTag: heroTag),
] else
SliverToBoxAdapter(
child: SizedBox(
height: MediaQuery.paddingOf(context).bottom +
StyleString.safeSpace,
),
),
] else if (videoDetailController.videoType ==
SearchType.media_bangumi)
Obx(
() => BangumiIntroPanel(
heroTag: heroTag, heroTag: heroTag,
showAiBottomSheet: showAiBottomSheet, cid: videoDetailController.cid.value,
showIntroDetail: showIntroDetail,
showEpisodes: showEpisodes, showEpisodes: showEpisodes,
onShowMemberPage: onShowMemberPage, showIntroDetail: showIntroDetail,
), ),
if (needRelated && videoDetailController.showRelatedVideo) ...[ ),
SliverToBoxAdapter( SliverToBoxAdapter(
child: Padding( child: SizedBox(
padding: height: MediaQuery.paddingOf(context).bottom +
const EdgeInsets.only(top: StyleString.safeSpace), (videoDetailController.isPlayAll &&
child: Divider( MediaQuery.orientationOf(context) ==
height: 1, Orientation.landscape
indent: 12, ? 75
endIndent: 12, : 0),
color: Theme.of(context) ),
.colorScheme )
.outline ],
.withOpacity(0.08),
),
),
),
RelatedVideoPanel(
key: relatedVideoPanelKey, heroTag: heroTag),
] else
SliverToBoxAdapter(
child: SizedBox(
height: MediaQuery.paddingOf(context).bottom +
StyleString.safeSpace,
),
),
] else if (videoDetailController.videoType ==
SearchType.media_bangumi)
Obx(
() => BangumiIntroPanel(
heroTag: heroTag,
cid: videoDetailController.cid.value,
showEpisodes: showEpisodes,
showIntroDetail: showIntroDetail,
),
),
SliverToBoxAdapter(
child: SizedBox(
height: MediaQuery.paddingOf(context).bottom +
(videoDetailController.isPlayAll &&
MediaQuery.orientationOf(context) ==
Orientation.landscape
? 75
: 0),
),
)
],
),
); );
if (videoDetailController.isPlayAll) { if (videoDetailController.isPlayAll) {
return Stack( return Stack(

View File

@@ -908,6 +908,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
body: Scaffold( body: Scaffold(
key: videoDetailController.childKey, key: videoDetailController.childKey,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column( body: Column(
children: [ children: [
buildTabbar( buildTabbar(
@@ -961,6 +962,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
child: Scaffold( child: Scaffold(
key: videoDetailController.childKey, key: videoDetailController.childKey,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column( body: Column(
children: [ children: [
buildTabbar(showReply: videoDetailController.showReply), buildTabbar(showReply: videoDetailController.showReply),
@@ -1005,6 +1007,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
child: Scaffold( child: Scaffold(
key: videoDetailController.childKey, key: videoDetailController.childKey,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column( body: Column(
children: [ children: [
buildTabbar( buildTabbar(
@@ -1057,6 +1060,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
child: Scaffold( child: Scaffold(
key: videoDetailController.childKey, key: videoDetailController.childKey,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column( body: Column(
children: [ children: [
buildTabbar( buildTabbar(
@@ -1163,6 +1167,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
child: Scaffold( child: Scaffold(
key: videoDetailController.childKey, key: videoDetailController.childKey,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column( body: Column(
children: [ children: [
buildTabbar( buildTabbar(
@@ -1179,16 +1184,13 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
if (videoDetailController.videoType == if (videoDetailController.videoType ==
SearchType.video && SearchType.video &&
videoDetailController.showRelatedVideo) videoDetailController.showRelatedVideo)
Material( CustomScrollView(
color: Colors.transparent, controller: _introController,
child: CustomScrollView( slivers: [
controller: _introController, RelatedVideoPanel(
slivers: [ key: relatedVideoPanelKey,
RelatedVideoPanel( heroTag: heroTag),
key: relatedVideoPanelKey, ],
heroTag: heroTag),
],
),
), ),
if (videoDetailController.showReply) if (videoDetailController.showReply)
videoReplyPanel(), videoReplyPanel(),