diff --git a/lib/common/widgets/custom_toast.dart b/lib/common/widgets/custom_toast.dart index 8dd62a51..9cd3461d 100644 --- a/lib/common/widgets/custom_toast.dart +++ b/lib/common/widgets/custom_toast.dart @@ -8,17 +8,19 @@ class CustomToast extends StatelessWidget { Widget build(BuildContext context) { return Container( margin: - EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom + 20), + EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom + 30), padding: const EdgeInsets.symmetric(horizontal: 17, vertical: 10), decoration: BoxDecoration( color: Theme.of(context).colorScheme.primaryContainer, borderRadius: BorderRadius.circular(20), ), - child: Text(msg, - style: Theme.of(context) - .textTheme - .labelMedium! - .copyWith(color: Theme.of(context).colorScheme.primary)), + child: Text( + msg, + style: TextStyle( + fontSize: 13, + color: Theme.of(context).colorScheme.primary, + ), + ), ); } } diff --git a/lib/common/widgets/network_img_layer.dart b/lib/common/widgets/network_img_layer.dart index 8c97c3fc..19630f88 100644 --- a/lib/common/widgets/network_img_layer.dart +++ b/lib/common/widgets/network_img_layer.dart @@ -58,7 +58,8 @@ class NetworkImgLayer extends StatelessWidget { } Widget placeholder(context) { - return SizedBox( + return Container( + color: Theme.of(context).colorScheme.onInverseSurface.withOpacity(0.6), width: width ?? double.infinity, height: height ?? double.infinity, child: Center( diff --git a/lib/pages/video/detail/introduction/view.dart b/lib/pages/video/detail/introduction/view.dart index 9b532931..9bad6f02 100644 --- a/lib/pages/video/detail/introduction/view.dart +++ b/lib/pages/video/detail/introduction/view.dart @@ -148,7 +148,7 @@ class _VideoInfoState extends State with TickerProviderStateMixin { ? Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - GestureDetector( + InkWell( onTap: () => showIntroDetail(), child: Row( children: [ @@ -178,23 +178,14 @@ class _VideoInfoState extends State 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: [ diff --git a/lib/pages/video/detail/introduction/widgets/intro_detail.dart b/lib/pages/video/detail/introduction/widgets/intro_detail.dart index b61a73c5..d45b6d47 100644 --- a/lib/pages/video/detail/introduction/widgets/intro_detail.dart +++ b/lib/pages/video/detail/introduction/widgets/intro_detail.dart @@ -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!), diff --git a/lib/pages/video/detail/reply/view.dart b/lib/pages/video/detail/reply/view.dart index 7de0529e..ae0a8164 100644 --- a/lib/pages/video/detail/reply/view.dart +++ b/lib/pages/video/detail/reply/view.dart @@ -100,10 +100,12 @@ class _VideoReplyPanelState extends State void replyReply(replyItem) { VideoDetailController videoDetailCtr = Get.find(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 diff --git a/lib/pages/video/detail/reply/widgets/reply_item.dart b/lib/pages/video/detail/reply/widgets/reply_item.dart index fff3f42a..e07c22b7 100644 --- a/lib/pages/video/detail/reply/widgets/reply_item.dart +++ b/lib/pages/video/detail/reply/widgets/reply_item.dart @@ -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), diff --git a/lib/pages/video/detail/replyReply/view.dart b/lib/pages/video/detail/replyReply/view.dart index c6c37495..bad46268 100644 --- a/lib/pages/video/detail/replyReply/view.dart +++ b/lib/pages/video/detail/replyReply/view.dart @@ -65,6 +65,8 @@ class _VideoReplyReplyPanelState extends State { _futureBuilderFuture = _videoReplyReplyController.queryReplyList(); } + void replyReply(replyItem) {} + @override void dispose() { // _videoReplyReplyController.scrollController.dispose(); @@ -122,6 +124,7 @@ class _VideoReplyReplyPanelState extends State { _videoReplyReplyController.replyList.add(replyItem); }, replyType: widget.replyType, + replyReply: (replyItem) => replyReply(replyItem), ), ), SliverToBoxAdapter(