fix: 二级评论点击报错、一些样式修改

This commit is contained in:
guozhigq
2023-07-27 21:31:28 +08:00
parent ca12be5373
commit f6c8c4f6a8
7 changed files with 30 additions and 25 deletions

View File

@ -148,7 +148,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GestureDetector(
InkWell(
onTap: () => showIntroDetail(),
child: Row(
children: [
@ -178,23 +178,14 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
return t.highlightColor.withOpacity(0.2);
}),
),
onPressed: () {
showBottomSheet(
context: context,
enableDrag: true,
builder: (BuildContext context) {
return IntroDetail(
videoDetail: widget.videoDetail!);
},
);
},
onPressed: () => showIntroDetail(),
icon: const Icon(Icons.more_horiz),
),
),
],
),
),
GestureDetector(
InkWell(
onTap: () => showIntroDetail(),
child: Row(
children: [

View File

@ -55,7 +55,7 @@ class IntroDetail extends StatelessWidget {
fontWeight: FontWeight.w500,
),
),
const SizedBox(height: 10),
const SizedBox(height: 4),
Row(
children: [
StatView(
@ -94,6 +94,7 @@ class IntroDetail extends StatelessWidget {
Text(videoDetail!.bvid!),
const SizedBox(height: 4),
Text.rich(
style: const TextStyle(height: 1.4),
TextSpan(
children: [
buildContent(context, videoDetail!),

View File

@ -100,10 +100,12 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
void replyReply(replyItem) {
VideoDetailController videoDetailCtr =
Get.find<VideoDetailController>(tag: Get.arguments['heroTag']);
videoDetailCtr.oid = replyItem.oid;
videoDetailCtr.fRpid = replyItem.rpid!;
videoDetailCtr.firstFloor = replyItem;
videoDetailCtr.showReplyReplyPanel();
if (replyItem != null) {
videoDetailCtr.oid = replyItem.oid;
videoDetailCtr.fRpid = replyItem.rpid!;
videoDetailCtr.firstFloor = replyItem;
videoDetailCtr.showReplyReplyPanel();
}
}
@override

View File

@ -34,7 +34,12 @@ class ReplyItem extends StatelessWidget {
return Material(
child: InkWell(
// 点击整个评论区 评论详情/回复
onTap: () => replyReply!(replyItem),
onTap: () {
feedBack();
if (replyReply != null) {
replyReply!(replyItem);
}
},
child: Padding(
padding: const EdgeInsets.fromLTRB(12, 4, 8, 2),
child: content(context),

View File

@ -65,6 +65,8 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
_futureBuilderFuture = _videoReplyReplyController.queryReplyList();
}
void replyReply(replyItem) {}
@override
void dispose() {
// _videoReplyReplyController.scrollController.dispose();
@ -122,6 +124,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
_videoReplyReplyController.replyList.add(replyItem);
},
replyType: widget.replyType,
replyReply: (replyItem) => replyReply(replyItem),
),
),
SliverToBoxAdapter(