opt: video page

show tabbar on landscape page
prevent showing bottomsheet above fullscreen video
This commit is contained in:
bggRGjQaUbCoE
2024-09-17 18:36:45 +08:00
parent c48400f5cd
commit 974f4bb848
3 changed files with 365 additions and 343 deletions

View File

@@ -12,7 +12,6 @@ import 'package:PiliPalaX/common/widgets/stat/danmu.dart';
import 'package:PiliPalaX/common/widgets/stat/view.dart'; import 'package:PiliPalaX/common/widgets/stat/view.dart';
import 'package:PiliPalaX/models/video_detail_res.dart'; import 'package:PiliPalaX/models/video_detail_res.dart';
import 'package:PiliPalaX/pages/video/detail/introduction/controller.dart'; import 'package:PiliPalaX/pages/video/detail/introduction/controller.dart';
import 'package:PiliPalaX/pages/video/detail/widgets/ai_detail.dart';
import 'package:PiliPalaX/utils/feed_back.dart'; import 'package:PiliPalaX/utils/feed_back.dart';
import 'package:PiliPalaX/utils/storage.dart'; import 'package:PiliPalaX/utils/storage.dart';
import 'package:PiliPalaX/utils/utils.dart'; import 'package:PiliPalaX/utils/utils.dart';
@@ -26,8 +25,15 @@ import 'widgets/page.dart';
import 'widgets/season.dart'; import 'widgets/season.dart';
class VideoIntroPanel extends StatefulWidget { class VideoIntroPanel extends StatefulWidget {
const VideoIntroPanel({required this.heroTag, super.key}); const VideoIntroPanel({
super.key,
required this.heroTag,
required this.showAiBottomSheet,
required this.showIntroDetail,
});
final String heroTag; final String heroTag;
final Function showAiBottomSheet;
final Function showIntroDetail;
@override @override
State<VideoIntroPanel> createState() => _VideoIntroPanelState(); State<VideoIntroPanel> createState() => _VideoIntroPanelState();
@@ -74,6 +80,8 @@ class _VideoIntroPanelState extends State<VideoIntroPanel>
loadingStatus: true, loadingStatus: true,
videoDetail: videoDetail, videoDetail: videoDetail,
heroTag: heroTag, heroTag: heroTag,
showAiBottomSheet: widget.showAiBottomSheet,
showIntroDetail: widget.showIntroDetail,
) )
: VideoInfo( : VideoInfo(
//key:herotag //key:herotag
@@ -81,6 +89,8 @@ class _VideoIntroPanelState extends State<VideoIntroPanel>
loadingStatus: false, loadingStatus: false,
videoDetail: videoIntroController.videoDetail.value, videoDetail: videoIntroController.videoDetail.value,
heroTag: heroTag, heroTag: heroTag,
showAiBottomSheet: widget.showAiBottomSheet,
showIntroDetail: widget.showIntroDetail,
)); ));
} }
} }
@@ -89,10 +99,17 @@ class VideoInfo extends StatefulWidget {
final bool loadingStatus; final bool loadingStatus;
final VideoDetailData? videoDetail; final VideoDetailData? videoDetail;
final String? heroTag; final String? heroTag;
final Function showAiBottomSheet;
final Function showIntroDetail;
const VideoInfo( const VideoInfo({
{Key? key, this.loadingStatus = false, this.videoDetail, this.heroTag}) Key? key,
: super(key: key); this.loadingStatus = false,
this.videoDetail,
this.heroTag,
required this.showAiBottomSheet,
required this.showIntroDetail,
}) : super(key: key);
@override @override
State<VideoInfo> createState() => _VideoInfoState(); State<VideoInfo> createState() => _VideoInfoState();
@@ -177,13 +194,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
return; return;
} }
feedBack(); feedBack();
showBottomSheet( widget.showIntroDetail(widget.videoDetail);
context: context,
enableDrag: true,
builder: (BuildContext context) {
return IntroDetail(videoDetail: widget.videoDetail!);
},
);
} }
// 用户主页 // 用户主页
@@ -200,17 +211,6 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
arguments: {'face': face, 'heroTag': memberHeroTag}); arguments: {'face': face, 'heroTag': memberHeroTag});
} }
// ai总结
showAiBottomSheet() {
showBottomSheet(
context: context,
enableDrag: true,
builder: (BuildContext context) {
return AiDetail(modelResult: videoIntroController.modelResult);
},
);
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final ThemeData t = Theme.of(context); final ThemeData t = Theme.of(context);
@@ -384,7 +384,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
final res = final res =
await videoIntroController.aiConclusion(); await videoIntroController.aiConclusion();
if (res['status']) { if (res['status']) {
showAiBottomSheet(); widget.showAiBottomSheet();
} }
}, },
child: child:

View File

@@ -1,6 +1,5 @@
import 'package:PiliPalaX/common/widgets/http_error.dart'; import 'package:PiliPalaX/common/widgets/http_error.dart';
import 'package:PiliPalaX/http/loading_state.dart'; import 'package:PiliPalaX/http/loading_state.dart';
import 'package:PiliPalaX/pages/video/detail/reply_reply/view.dart';
import 'package:easy_debounce/easy_throttle.dart'; import 'package:easy_debounce/easy_throttle.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
@@ -18,6 +17,7 @@ class VideoReplyPanel extends StatefulWidget {
final int rpid; final int rpid;
final String? replyLevel; final String? replyLevel;
final String heroTag; final String heroTag;
final Function replyReply;
const VideoReplyPanel({ const VideoReplyPanel({
this.bvid, this.bvid,
@@ -25,6 +25,7 @@ class VideoReplyPanel extends StatefulWidget {
this.rpid = 0, this.rpid = 0,
this.replyLevel, this.replyLevel,
required this.heroTag, required this.heroTag,
required this.replyReply,
super.key, super.key,
}); });
@@ -115,21 +116,6 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
} }
} }
// 展示二级回复
void replyReply(replyItem) {
showBottomSheet(
context: context,
builder: (context) => VideoReplyReplyPanel(
rcount: replyItem.rcount,
oid: replyItem.oid,
rpid: replyItem.rpid,
firstFloor: replyItem,
replyType: ReplyType.video,
source: 'videoDetail',
),
);
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
super.build(context); super.build(context);
@@ -239,7 +225,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
replyItem: loadingState.response[index], replyItem: loadingState.response[index],
showReplyRow: true, showReplyRow: true,
replyLevel: replyLevel, replyLevel: replyLevel,
replyReply: replyReply, replyReply: widget.replyReply,
replyType: ReplyType.video, replyType: ReplyType.video,
onReply: () { onReply: () {
_videoReplyController.onReply( _videoReplyController.onReply(

View File

@@ -4,6 +4,10 @@ import 'dart:math';
import 'package:PiliPalaX/common/constants.dart'; import 'package:PiliPalaX/common/constants.dart';
import 'package:PiliPalaX/http/loading_state.dart'; import 'package:PiliPalaX/http/loading_state.dart';
import 'package:PiliPalaX/models/common/reply_type.dart';
import 'package:PiliPalaX/pages/video/detail/introduction/widgets/intro_detail.dart';
import 'package:PiliPalaX/pages/video/detail/reply_reply/view.dart';
import 'package:PiliPalaX/pages/video/detail/widgets/ai_detail.dart';
import 'package:PiliPalaX/utils/extension.dart'; import 'package:PiliPalaX/utils/extension.dart';
import 'package:PiliPalaX/utils/id_utils.dart'; import 'package:PiliPalaX/utils/id_utils.dart';
import 'package:auto_orientation/auto_orientation.dart'; import 'package:auto_orientation/auto_orientation.dart';
@@ -76,6 +80,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
late final MethodChannel onUserLeaveHintListener; late final MethodChannel onUserLeaveHintListener;
// StreamSubscription<Duration>? _bufferedListener; // StreamSubscription<Duration>? _bufferedListener;
final scaffoldKey = GlobalKey<ScaffoldState>();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@@ -411,7 +417,11 @@ class _VideoDetailPageState extends State<VideoDetailPage>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
/// tabbar /// tabbar
Widget tabbarBuild = Container( Widget tabbarBuild([
bool needIndicator = true,
String introText = '简介',
]) {
return Container(
width: double.infinity, width: double.infinity,
height: 45, height: 45,
decoration: BoxDecoration( decoration: BoxDecoration(
@@ -429,14 +439,16 @@ class _VideoDetailPageState extends State<VideoDetailPage>
flex: 1, flex: 1,
child: Obx( child: Obx(
() => TabBar( () => TabBar(
indicatorColor: needIndicator ? null : Colors.transparent,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
controller: videoDetailController.tabCtr, controller: videoDetailController.tabCtr,
labelStyle: const TextStyle(fontSize: 13), labelStyle: const TextStyle(fontSize: 13),
labelPadding: labelPadding: const EdgeInsets.symmetric(
const EdgeInsets.symmetric(horizontal: 10.0), // 设置每个标签的宽度 horizontal: 10.0), // 设置每个标签的宽度
dividerColor: Colors.transparent, dividerColor: Colors.transparent,
onTap: (value) { onTap: (value) {
if (!videoDetailController.tabCtr.indexIsChanging) { if (!needIndicator ||
!videoDetailController.tabCtr.indexIsChanging) {
if (value == 0) { if (value == 0) {
_introController.animToTop(); _introController.animToTop();
} else { } else {
@@ -445,7 +457,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
} }
}, },
tabs: [ tabs: [
const Tab(text: '简介'), Tab(text: introText),
Tab( Tab(
text: text:
'评论${_videoReplyController.count.value == -1 ? '' : ' ${_videoReplyController.count.value}'}', '评论${_videoReplyController.count.value == -1 ? '' : ' ${_videoReplyController.count.value}'}',
@@ -454,59 +466,11 @@ class _VideoDetailPageState extends State<VideoDetailPage>
), ),
), ),
), ),
Flexible(
flex: 1,
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
SizedBox(
height: 32,
child: TextButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
),
onPressed: null,
// onPressed: () => videoDetailController.showShootDanmakuSheet(),
child:
const Text('发弹幕', style: TextStyle(fontSize: 12)),
),
),
// SizedBox(
// width: 38,
// height: 38,
// child: Obx(
// () => IconButton(
// onPressed: () {
// plPlayerController?.isOpenDanmu.value =
// !(plPlayerController?.isOpenDanmu.value ??
// false);
// },
// icon: !(plPlayerController?.isOpenDanmu.value ??
// false)
// ? SvgPicture.asset(
// 'assets/images/video/danmu_close.svg',
// // ignore: deprecated_member_use
// color:
// Theme.of(context).colorScheme.outline,
// )
// : SvgPicture.asset(
// 'assets/images/video/danmu_open.svg',
// // ignore: deprecated_member_use
// color:
// Theme.of(context).colorScheme.primary,
// ),
// ),
// ),
// ),
const SizedBox(width: 14),
],
),
)),
], ],
), ),
), ),
); );
}
Widget plPlayer = FutureBuilder( Widget plPlayer = FutureBuilder(
future: _futureBuilderFuture, future: _futureBuilderFuture,
@@ -664,8 +628,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
if (!removeSafeArea) showStatusBar(); if (!removeSafeArea) showStatusBar();
} }
return Container( return Container(
color: color: showStatusBarBackgroundColor ? null : Colors.black,
showStatusBarBackgroundColor ? null : Colors.black,
height: MediaQuery.of(context).orientation == height: MediaQuery.of(context).orientation ==
Orientation.landscape || Orientation.landscape ||
isFullScreen.value == true isFullScreen.value == true
@@ -682,8 +645,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
(horizontalScreen || (horizontalScreen ||
MediaQuery.of(context).orientation == MediaQuery.of(context).orientation ==
Orientation.portrait), Orientation.portrait),
onPopInvokedWithResult: onPopInvokedWithResult: (bool didPop, Object? result) {
(bool didPop, Object? result) {
if (isFullScreen.value == true) { if (isFullScreen.value == true) {
plPlayerController! plPlayerController!
.triggerFullScreen(status: false); .triggerFullScreen(status: false);
@@ -703,8 +665,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
.autoPlay.value) ...<Widget>[ .autoPlay.value) ...<Widget>[
Obx( Obx(
() => Visibility( () => Visibility(
visible: videoDetailController visible:
.isShowCover.value, videoDetailController.isShowCover.value,
child: Positioned( child: Positioned(
top: 0, top: 0,
left: 0, left: 0,
@@ -727,7 +689,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
manualPlayerWidget, manualPlayerWidget,
] ]
], ],
)), ),
),
); );
}, },
), ),
@@ -735,9 +698,11 @@ class _VideoDetailPageState extends State<VideoDetailPage>
child: ColoredBox( child: ColoredBox(
key: Key(heroTag), key: Key(heroTag),
color: Theme.of(context).colorScheme.surface, color: Theme.of(context).colorScheme.surface,
child: Column( child: Scaffold(
key: scaffoldKey,
body: Column(
children: [ children: [
tabbarBuild, tabbarBuild(),
Expanded( Expanded(
child: TabBarView( child: TabBarView(
physics: const BouncingScrollPhysics(), physics: const BouncingScrollPhysics(),
@@ -749,7 +714,11 @@ class _VideoDetailPageState extends State<VideoDetailPage>
slivers: <Widget>[ slivers: <Widget>[
if (videoDetailController.videoType == if (videoDetailController.videoType ==
SearchType.video) ...[ SearchType.video) ...[
VideoIntroPanel(heroTag: heroTag), VideoIntroPanel(
heroTag: heroTag,
showAiBottomSheet: showAiBottomSheet,
showIntroDetail: showIntroDetail,
),
] else if (videoDetailController ] else if (videoDetailController
.videoType == .videoType ==
SearchType.media_bangumi) ...[ SearchType.media_bangumi) ...[
@@ -776,13 +745,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
RelatedVideoPanel(heroTag: heroTag), RelatedVideoPanel(heroTag: heroTag),
], ],
), ),
Obx( videoReplyPanel,
() => VideoReplyPanel(
bvid: videoDetailController.bvid,
oid: videoDetailController.oid.value,
heroTag: heroTag,
),
)
], ],
), ),
), ),
@@ -790,8 +753,10 @@ class _VideoDetailPageState extends State<VideoDetailPage>
), ),
), ),
), ),
),
], ],
)), ),
),
], ],
), ),
); );
@@ -851,17 +816,28 @@ class _VideoDetailPageState extends State<VideoDetailPage>
]), ]),
), ),
), ),
Expanded(
child: Scaffold(
key: scaffoldKey,
body: Column(
children: [
tabbarBuild(),
Expanded( Expanded(
child: TabBarView( child: TabBarView(
physics: const BouncingScrollPhysics(), physics: const BouncingScrollPhysics(),
controller: videoDetailController.tabCtr, controller: videoDetailController.tabCtr,
children: <Widget>[ children: <Widget>[
CustomScrollView( CustomScrollView(
controller: _introController,
key: const PageStorageKey<String>('简介'), key: const PageStorageKey<String>('简介'),
slivers: <Widget>[ slivers: <Widget>[
if (videoDetailController.videoType == if (videoDetailController.videoType ==
SearchType.video) ...[ SearchType.video) ...[
VideoIntroPanel(heroTag: heroTag), VideoIntroPanel(
heroTag: heroTag,
showAiBottomSheet: showAiBottomSheet,
showIntroDetail: showIntroDetail,
),
] else if (videoDetailController.videoType == ] else if (videoDetailController.videoType ==
SearchType.media_bangumi) ...[ SearchType.media_bangumi) ...[
Obx(() => BangumiIntroPanel( Obx(() => BangumiIntroPanel(
@@ -870,30 +846,29 @@ class _VideoDetailPageState extends State<VideoDetailPage>
], ],
SliverToBoxAdapter( SliverToBoxAdapter(
child: Padding( child: Padding(
padding: padding: const EdgeInsets.only(
const EdgeInsets.only(top: StyleString.safeSpace), top: StyleString.safeSpace),
child: Divider( child: Divider(
height: 1, height: 1,
indent: 12, indent: 12,
endIndent: 12, endIndent: 12,
color: color: Theme.of(context)
Theme.of(context).dividerColor.withOpacity(0.06), .dividerColor
.withOpacity(0.06),
), ),
), ),
), ),
RelatedVideoPanel(heroTag: heroTag), RelatedVideoPanel(heroTag: heroTag),
], ],
), ),
Obx( videoReplyPanel,
() => VideoReplyPanel(
bvid: videoDetailController.bvid,
oid: videoDetailController.oid.value,
heroTag: heroTag,
),
)
], ],
), ),
), ),
],
),
),
),
]); ]);
} }
final double videoHeight = context.height / 2.5; final double videoHeight = context.height / 2.5;
@@ -953,31 +928,46 @@ class _VideoDetailPageState extends State<VideoDetailPage>
), ),
), ),
Expanded( Expanded(
child: Row(children: [ child: Scaffold(
key: scaffoldKey,
body: Column(
children: [
tabbarBuild(false),
Expanded(
child: Row(
children: [
Expanded( Expanded(
child: CustomScrollView( child: CustomScrollView(
key: PageStorageKey<String>('简介${videoDetailController.bvid}'), controller: _introController,
key: PageStorageKey<String>(
'简介${videoDetailController.bvid}'),
slivers: <Widget>[ slivers: <Widget>[
if (videoDetailController.videoType == SearchType.video) ...[ if (videoDetailController.videoType ==
VideoIntroPanel(heroTag: heroTag), SearchType.video) ...[
VideoIntroPanel(
heroTag: heroTag,
showAiBottomSheet: showAiBottomSheet,
showIntroDetail: showIntroDetail,
),
RelatedVideoPanel(heroTag: heroTag), RelatedVideoPanel(heroTag: heroTag),
] else if (videoDetailController.videoType == ] else if (videoDetailController.videoType ==
SearchType.media_bangumi) ...[ SearchType.media_bangumi) ...[
Obx(() => BangumiIntroPanel( Obx(() => BangumiIntroPanel(
heroTag: heroTag, cid: videoDetailController.cid.value)), heroTag: heroTag,
cid: videoDetailController.cid.value)),
] ]
], ],
)), )),
Expanded( Expanded(
child: Obx( child: videoReplyPanel,
() => VideoReplyPanel( )
bvid: videoDetailController.bvid, ],
oid: videoDetailController.oid.value,
heroTag: heroTag,
),
), ),
) )
])) ],
),
),
),
], ],
); );
}); });
@@ -994,7 +984,11 @@ class _VideoDetailPageState extends State<VideoDetailPage>
key: PageStorageKey<String>('简介${videoDetailController.bvid}'), key: PageStorageKey<String>('简介${videoDetailController.bvid}'),
slivers: <Widget>[ slivers: <Widget>[
if (videoDetailController.videoType == SearchType.video) ...[ if (videoDetailController.videoType == SearchType.video) ...[
VideoIntroPanel(heroTag: heroTag), VideoIntroPanel(
heroTag: heroTag,
showAiBottomSheet: showAiBottomSheet,
showIntroDetail: showIntroDetail,
),
RelatedVideoPanel(heroTag: heroTag), RelatedVideoPanel(heroTag: heroTag),
] else if (videoDetailController.videoType == ] else if (videoDetailController.videoType ==
SearchType.media_bangumi) ...[ SearchType.media_bangumi) ...[
@@ -1052,12 +1046,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
), ),
), ),
Expanded( Expanded(
child: Obx( child: Scaffold(
() => VideoReplyPanel( key: scaffoldKey,
bvid: videoDetailController.bvid, body: videoReplyPanel,
oid: videoDetailController.oid.value,
heroTag: heroTag,
),
), ),
), ),
// Expanded( // Expanded(
@@ -1169,7 +1160,11 @@ class _VideoDetailPageState extends State<VideoDetailPage>
slivers: <Widget>[ slivers: <Widget>[
if (videoDetailController.videoType == if (videoDetailController.videoType ==
SearchType.video) ...[ SearchType.video) ...[
VideoIntroPanel(heroTag: heroTag), VideoIntroPanel(
heroTag: heroTag,
showAiBottomSheet: showAiBottomSheet,
showIntroDetail: showIntroDetail,
),
// RelatedVideoPanel(heroTag: heroTag), // RelatedVideoPanel(heroTag: heroTag),
] else if (videoDetailController.videoType == ] else if (videoDetailController.videoType ==
SearchType.media_bangumi) ...[ SearchType.media_bangumi) ...[
@@ -1194,26 +1189,32 @@ class _VideoDetailPageState extends State<VideoDetailPage>
MediaQuery.of(context).padding.right))), MediaQuery.of(context).padding.right))),
height: context.height - height: context.height -
(removeSafeArea ? 0 : MediaQuery.of(context).padding.top), (removeSafeArea ? 0 : MediaQuery.of(context).padding.top),
child: Scaffold(
key: scaffoldKey,
body: Column(
children: [
tabbarBuild(true, '相关视频'),
Expanded(
child: TabBarView( child: TabBarView(
physics: const BouncingScrollPhysics(), physics: const BouncingScrollPhysics(),
controller: videoDetailController.tabCtr, controller: videoDetailController.tabCtr,
children: <Widget>[ children: <Widget>[
if (videoDetailController.videoType == SearchType.video) if (videoDetailController.videoType ==
SearchType.video)
CustomScrollView( CustomScrollView(
controller: _introController,
slivers: [ slivers: [
RelatedVideoPanel(heroTag: heroTag), RelatedVideoPanel(heroTag: heroTag),
], ],
), ),
Obx( videoReplyPanel,
() => VideoReplyPanel( ],
bvid: videoDetailController.bvid,
oid: videoDetailController.oid.value,
heroTag: heroTag,
), ),
) )
], ],
), ),
), ),
),
) )
], ],
); );
@@ -1239,7 +1240,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
systemNavigationBarColor: Colors.transparent), systemNavigationBarColor: Colors.transparent),
), ),
body: Container( body: Container(
color: Theme.of(context).colorScheme.background, color: Theme.of(context).colorScheme.surface,
child: SafeArea( child: SafeArea(
left: !removeSafeArea && isFullScreen.value != true, left: !removeSafeArea && isFullScreen.value != true,
right: !removeSafeArea && isFullScreen.value != true, right: !removeSafeArea && isFullScreen.value != true,
@@ -1268,7 +1269,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
systemNavigationBarColor: Colors.transparent), systemNavigationBarColor: Colors.transparent),
), ),
body: Container( body: Container(
color: Theme.of(context).colorScheme.background, color: Theme.of(context).colorScheme.surface,
child: SafeArea( child: SafeArea(
left: !removeSafeArea && isFullScreen.value != true, left: !removeSafeArea && isFullScreen.value != true,
right: !removeSafeArea && isFullScreen.value != true, right: !removeSafeArea && isFullScreen.value != true,
@@ -1324,7 +1325,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
return LayoutBuilder( return LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) { builder: (BuildContext context, BoxConstraints constraints) {
if (!isShowing) { if (!isShowing) {
return ColoredBox(color: Theme.of(context).colorScheme.background); return ColoredBox(color: Theme.of(context).colorScheme.surface);
} }
if (constraints.maxWidth > constraints.maxHeight * 1.25) { if (constraints.maxWidth > constraints.maxHeight * 1.25) {
// hideStatusBar(); // hideStatusBar();
@@ -1372,4 +1373,39 @@ class _VideoDetailPageState extends State<VideoDetailPage>
// : childWhenDisabledLandscape; // : childWhenDisabledLandscape;
}); });
} }
Widget get videoReplyPanel => Obx(
() => VideoReplyPanel(
bvid: videoDetailController.bvid,
oid: videoDetailController.oid.value,
heroTag: heroTag,
replyReply: replyReply,
),
);
// 展示二级回复
void replyReply(replyItem) {
scaffoldKey.currentState?.showBottomSheet(
(context) => VideoReplyReplyPanel(
rcount: replyItem.rcount,
oid: replyItem.oid,
rpid: replyItem.rpid,
firstFloor: replyItem,
replyType: ReplyType.video,
source: 'videoDetail',
),
);
}
// ai总结
showAiBottomSheet() {
scaffoldKey.currentState?.showBottomSheet(
enableDrag: true,
(context) => AiDetail(modelResult: videoIntroController.modelResult));
}
showIntroDetail(videoDetail) {
scaffoldKey.currentState?.showBottomSheet(
enableDrag: true, (context) => IntroDetail(videoDetail: videoDetail));
}
} }